update strategies for first class futures n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Update Strategies for First Class Futures PowerPoint Presentation
Download Presentation
Update Strategies for First Class Futures

Loading in 2 Seconds...

play fullscreen
1 / 41

Update Strategies for First Class Futures - PowerPoint PPT Presentation


  • 110 Views
  • Uploaded on

Update Strategies for First Class Futures. Khan Muhammad, Ludovic Henrio INRIA, Univ. Nice Sophia Antipolis,CNRS. Introduction / Contributions. Semi-formal event-like notation Compromise between easy to read and precision Cost analysis of the strategies Cost in terms of message exchanges

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Update Strategies for First Class Futures' - verlee


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
update strategies for first class futures

Update Strategies for First Class Futures

Khan Muhammad, Ludovic Henrio

INRIA, Univ. Nice Sophia Antipolis,CNRS

introduction contributions
Introduction / Contributions
  • Semi-formal event-like notation
    • Compromise between easy to read and precision
  • Cost analysis of the strategies
    • Cost in terms of message exchanges
  • Experimental Evaluation
    • Verifying the results of the cost analysis

Goal: Analysis of future update strategies

Which is the best future update strategy?

table of contents
Table of Contents
  • Background & Related Work
  • Future Update Strategies
  • Semi-formal notation for modeling strategies
  • Cost analysis & Experimental evaluation
  • Conclusion & Future directions
active objects overview

Message Queue

Pending Requests

A

Activity thread

Membrane (Body)

Passive Objects

Active Objects (Overview)
active objects futures wbn

JVM

A

A

WBN!

Active objects,Futures & WBN

A ag =newActive (“A”, […], VirtualNode)

V v1 = ag.foo (param);

V v2 = ag.bar (param);

...

v1.bar(); //Wait-By-Necessity

JVM

Wait-By-Necessity is a Dataflow

Synchronization

ag

v2

v1

V

Java Object

Active Object

Req. Queue

Future Object

Proxy

Thread

Request

context
Context
  • Active Objects
    • Single Activity Thread: no shared memory
    • Message Queue
  • Futures
    • Creation: Explicit/implicit
    • Access: Explicit vs transparent
    • First class futures: transmit futures between AO
          • Increases parallelism
    • Wait by necessity (Strict operations)
          • Data flow synchronization
related work
Related Work
  • Lambda Calculus, Multi-Lisp, ABCL/f
    • Not first class futures
  • Creol
    • Explicit future Creation
    • Explicit access
  • Ambient Talk
    • Future access is asynchronous
    • No synchronization
table of contents1
Table of Contents
  • Background & Related Work
  • Future Update Strategies
  • Semi-formal notation for modeling strategies
  • Cost analysis
  • Experimental evaluation
  • Conclusion & Future directions
future update strategies
Future update strategies
  • Can be divided in two categories
    • Eager
      • Future updated as soon as result is available
    • Lazy
      • On demand / “need to know” future update
  • Eager Strategies
    • Eager forward-based
    • Eager message-based
  • Lazy
    • Lazy message-based
  • No Partial Replies & requests
    • No First-class futures
future update strategies no partial replies and request
Future Update Strategies: No partial replies and request

a

b

Cannot Pass Future references between ActiveObjects

delta.send(result)

d

future update strategies first class futures
Future Update Strategies: First Class Futures

a

b

Only operations that manipulate future value are blocking

result = beta.get()

delta.send(result)

Result.bar()

d

g

gamma.send(param)

future update strategies forward based
Future Update Strategies: Forward-based

a

b

delta.send(result)

result.bar()

result.bar()

d

g

future update strategies forward based1
Future Update Strategies: Forward-based

a

b

delta.send(result)

result.bar()

result.bar()

d

g

future update strategies forward based2
Future Update Strategies: Forward-based

a

b

Future updates follow the same path as future references

delta.send(result)

result.bar()

result.bar()

d

g

future update strategies forward based summary
Future Update Strategies: Forward-based (summary)
  • All futures references are eventually updated
  • Future update starts as soon as value is computed
  • Each AO is responsible for updating futures it has forwarded
  • Future updates follow the same path as futures
    • Future value may need to pass through “n” intermediate hops
  • Future value is serialized and de-serialized at each intermediate node
  • Once the value is updated, no need to store it further
future update strategies message based
Future Update Strategies: Message-based

a

b

delta.send(result)

result.bar()

result.bar()

d

g

future update strategies message based1
Future Update Strategies: Message-based

a

b

delta.send(result)

result.bar()

result.bar()

d

g

future update strategies message based2
Future Update Strategies: Message-based

a

b

delta.send(result)

result.bar()

result.bar()

d

Future Registration

Messages

g

future update strategies message based 2
Future Update Strategies: Message-based(2)

a

b

Additional Registration Messages required

result = beta.get()

delta.send(result)

Result.bar()

d

g

gamma.send(param)

future update strategies message based summary
Future Update Strategies: Message-based (Summary)
  • Centralized future updates
    • All updates are performed by “Home” node
  • Future update starts as soon as value is computed
  • Additional “future registration” messages needed
  • One-to-many communication to avoid multiple serializations
  • Computed results are stored until all futures have been updated
future update strategies lazy 2
Future Update Strategies: lazy(2)

a

b

result = beta.get()

delta.send(result)

Result.bar()

d

g

gamma.send(param)

future update strategies lazy 21
Future Update Strategies: lazy(2)

a

b

result = beta.get()

delta.send(result)

Result.bar()

d

g

gamma.send(param)

future update strategies lazy future updates
Future Update Strategies: Lazy Future Updates

a

b

“on demand” future update

delta.send(result)

result.bar()

result.bar()

d

g

future update strategies lazy strategy summary
Future Update Strategies: Lazy Strategy (Summary)
  • Centralized future update
  • Least number of messages exchanged (unless Worst case)
  • On demand registration and update
  • Additional delay
  • Good when only some nodes need the future value
    • No need to update intermediate nodes
table of contents2
Table of Contents
  • Background & Related Work
  • Future Update Strategies
  • Semi-formal notation for modeling strategies
  • Cost analysis & Experimental evaluation
  • Conclusion & Future directions
semi formal notation for strategies
Semi-formal notation for strategies
  • Modeled as combination of operations & events
    • Operations
      • Register future (Reg)
      • Locally update future with value (Update)
      • Clear future from list (Clear)
      • Send future value (SendValue)
    • Events
      • Create future (Create)
      • Send future reference (SendRef)
      • Future Computed (FutureComputed)
      • Wait by necessity (Wait)
eager message based strategy semi formal notation
Eager Message-based Strategy (semi-formal notation)

Compromise between “readability” and precision

table of contents3
Table of Contents
  • Background & Related Work
  • Future Update Strategies
  • Semi-formal notation for modeling strategies
  • Cost analysis & Experimental evaluation
  • Conclusion & Future directions
comparison cost analysis
Comparison/Cost Analysis

Simple model to allow reasoning about strategy selection at abstract lvl

  • “Computation time” is not taken into account (application dependent)
  • Only “time to update future”
  • Assumes that result has been computed when the registration request is received
table of contents4
Table of Contents
  • Background & Related Work
  • Future Update Strategies
  • Semi-formal notation for modeling strategies
  • Cost analysis & Experimental evaluation
  • Conclusion & Future directions
conclusion future directions 1
Conclusion & Future directions (1)
  • Selection of a strategy depends on application nature (and configuration)
  • Eager forward-based:
    • Most nodes actually require future value
    • Small number of intermediate nodes
    • Size of transferred data is “not huge”
  • Message-based:
    • Most nodes actually require future value
    • No network constraints
    • Constant future update time needed (single hop)
  • Lazy message-based:
    • Only few nodes actually require future value
    • Future value is “too large”
    • Long term storage of values is not a concern
conclusion future directions 2

Merci !

Conclusion & Future directions (2)
  • Garbage Collection of computed Futures for message-based strategies
  • Protocol for “cancel future update” for objects not interested in future value (a un-register message)
  • Canceling a request
  • Migration: for message-based strategies
experimental setting
Experimental Setting

Trees of different heights

Pipe of varying length

f

f

f

f

f

f

experimental setting1
Experimental Setting
  • Exp (1)
    • Tree configuration (varying height & degree)
    • Fixed future size of (20 MB)
    • Tree of 30 nodes
    • Only leaf nodes (8 max) a perform strict operation
    • Cluster of 10 physical Nodes (university of sannio)
  • Exp (2)
    • Pipe of varying length
    • Only last node in pipe makes a strict operation
    • Fixed future size (20 MB)
current implementation status
Current implementation status
  • Currently a prototype implementation with university of sannio
    • Does not fit well with current AC mechanism
      • Does not reuse ProActive’s AC mechanisms
    • Functionality is spread over different classes

-> Need to be brought in-line with the AC mechanism of ProActive.

    • No garbage collection for computed results +registration requests
    • Home-based strategies are implemented using a “reference to home” (body) in FutureProxy (will cause problems for migration)
    • Additional class “RequestForFuture.java added to implement registration
    • Implementing a multi-threaded future update mechanism with unique-serialization
wait by necessity
Wait-by-necessity

a

b

delta.send(result)

d

wait by necessity1
Wait-by-necessity

result.bar()

a

b

delta.send(result)

result.bar()

d

wait by necessity2
Wait-by-necessity

result.bar()

a

b

delta.send(result)

result.bar()

d

wait by necessity3
Wait-by-necessity

a

b

Futures updates can

occur at any time

result.bar()

d