1 / 9

Emerald - et OO-språk for distribuerte applikasjoner

Emerald - et OO-språk for distribuerte applikasjoner. Eric Jul PSE. Immutable Objects. Immutable objects cannot change state Examples: The integer 17 User-defined immutable objects: for example complex numbers Immutable objects are omnipresent

bettylamb
Download Presentation

Emerald - et OO-språk for distribuerte applikasjoner

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Emerald - et OO-språk for distribuerte applikasjoner Eric Jul PSE

  2. Immutable Objects • Immutable objects cannot change state • Examples: The integer 17 • User-defined immutable objects: for example complex numbers • Immutable objects are omnipresent • Types must be immutable to allow static type checking

  3. Types are Immutable Objects Example: arrays varai: Array.of[Integer] ai <- Array.of[Integer].create[] varaai: Array.of[Array.of[Integer]]

  4. Let’s look at the implementation of Array (Switch to code…)

  5. Why Mobility • Local callsaretypically 1,000 – 10,000 times faster thanremotecalls • Mobility for: • performance • availability • NOTE: oftentradeoff - conflicting

  6. Mobility and Location Concepts locate X returns (one of) the object X’s locations move X to Y if possible, move the object X to the node where Y is (or ratherwas) fix X at Y as move BUT MUST migrate disregardsubsequentmoves refix X at Y as fix but for fixedobjects unfix X allow normal moves

  7. var B: some data object … X.F[move B] … … X.F[visit B] … object X operation F[arg:T] loop arg.g[…] exit after many loops end loop end X Call-by-move

  8. Breakeven for Accessing a Parameter Breakeven: The number of calls to the parameter objectswhere it costsabout the same to do REMOTE access as it costs to use Call-by-Visit

  9. How Many Calls of B? Questions: given a normal PC enviroment, say 2 GHz CPU, 10 Mbit/s Ethernet, how many calls of a small (say 100 bytes) argument B before breakeven? • 1 • 10 • 100 • 1,000 • 10,000 • 100,000

More Related