Title: ASYNCHRONOUS AND DETERMINISTIC OBJECTS
1ASYNCHRONOUS AND DETERMINISTIC OBJECTS
Denis CAROMEL, Ludovic HENRIO, Bernard Paul
SERPETTE
- ASP Asynchronous Sequential Processes
- Distributed objects
- Asynchronous method calls
- Futures and Wait-by-necessity
- Determinism properties
I3S - INRIA - Univ Nice Sophia-Antipolis
2Context
- V-calculus
- Objects, not concurrent
- Some concurrent extensions, not our way to
determinism - ?-calculus
- Communications, channel based, not object
structured - Linear(ized) channels(pobl), no implicit
synchronization - Process Networks
- Processes, channel based, not object oriented
- Determinism, no implicit synchronization
Context
3Contents
- 1 - ASP Principles
- 2 - Syntax and Semantics
- 3 - Confluence and Determinacy
- 4 - Conclusion
4Structure
Active(a)
1- ASP Principles
5Sending Requests ( REQUEST )
a
b
foo
beta.foo(b)
resultbeta.foo(b)
1- ASP Principles
6Sending Requests ( REQUEST )
a
b
foo
beta.foo(b)
resultbeta.foo(b)
1- ASP Principles
7Serving Requests ( SERVE )
a
b
Serve(foo)...
foo
beta.foo(b)
bar
Serve(foo)...
1- ASP Principles
8Serving Requests ( SERVE )
a
b
Serve(foo)
beta.foo(b)
bar
Serve(foo)...
1- ASP Principles
9End of Service ( ENDSERVICE )
a
b
value
...
foo
1- ASP Principles
10End of Service ( ENDSERVICE )
a
b
...
foo
1- ASP Principles
11Sending Results ( REPLY )
a
b
foo
1- ASP Principles
12Sending Results ( REPLY )
a
b
foo
1- ASP Principles
13Wait by Necessity
a
b
delta.send(result)
d
1- ASP Principles
14Wait by Necessity
a
b
delta.send(result)
result.bar()
d
1- ASP Principles
15Wait by Necessity
a
b
delta.send(result)
result.bar()
d
1- ASP Principles
16Wait by Necessity
a
b
Futures updates can occur at any time
result.bar()
d
1- ASP Principles
17Contents
- 1 - ASP Principles
- 2 - Syntax and Semantics
- 3 - Confluence and Determinacy
- 4 - Conclusion
18ASP Syntax source terms
- Imperative V-calculus
- ASP parallelism primitives
2- Syntax and Semantics
19Local
Creating Activity
Sending request
Receiving replies
2- Syntax and Semantics
20Contents
- 1 - ASP Principles
- 2 - Syntax and Semantics
- 3 - Confluence and Determinacy
- 4 - Conclusion
21Compatibility
Serves the oldest request on foo OR bar
bar
d
. Serve(foo,bar) Serve(foo,gee)
foo
gee
3- Confluence and Determinacy
22Confluence
Execution characterized by the order of Request
Senders
Compatibility ? Confluence
3- Confluence and Determinacy
23Deterministic Object Networks
g
b
d
foo,bar , foo,gee
bar,gee , foo
gee bar
bar gee
3- Confluence and Determinacy
24Static DON
a
d
f
foo,bar , gee
gee, f,g
foo,bar , gee
f,g
g
g
g
foo
f
foo,bar , gee
foo, bar
bar
e
f
b
bar , gee
gee, f,g
gee, f,g
gee
3- Confluence and Determinacy
25Contents
- 1 - ASP Principles
- 2 - Syntax and Semantics
- 3 - Confluence and Determinacy
- 4 - Conclusion
26Conclusion
- An Asynchronous Object Calculus
- Structured asynchronous activities
- Structured communications with futures
- Data-driven synchronization
- ASP ? Confluence and Determinacy
- Future updates can occur at any time
- Execution characterized by the order of request
senders - Determinacy of programs communicating over trees,
Thank You Any Question?
4- Conclusion
27Perspectives
- Approximation of confluence property
- Static analysis
- Generalization of confluence property
- Functional behavior
- Scheduling of requests
- Extensions of ASP
- Group communication
- Component calculus
- Mobility and other features
28Related Work
- Futures and Wait by Necessity
- MultiLisp by Halstead
- Wait-By-Necessity by Caromel
- Determinism
- pobl by Jones, Linearized channels
- Process Networks by Kahn and MacQueen
- Objects and concurrency
- Obliq, Gordon-Hankin-Lassen
- Actors
- ?-calculus, blue calculus, join-calculus
29Intermediate Structures
- Terms
- Configuration
- Request queue
- Futures list
- Store
30Static DON versus Process Networks
a
d
f
foo,bar , gee
gee, f,g
foo,bar , gee
f,g
g
put
g
g
foo
f
foo,bar , gee
foo, bar
bar
e
f
b
get
bar , gee
gee, f,g
gee, f,g
gee
31Activity Creation ( NEWACT )
a
Active(a)
b
newactActive(a)
32Objects Topology
b
a
g
d
33Equivalence Modulo Futures Updates
a
f1
b
g
f2
f3
34More Futures
a
d
...
result.bar()
b
g
35More Futures
a
d
result.bar()
b
g
36More Futures
a
d
result.bar()
b
g
37More Futures
a
d
result.bar()
b
g
38More Futures
a
d
Futures updates can occur at any time
result.bar()
b
g
39Concurrent Constraint Programming
- Constraint programming, different notion of store
- Shared memory
- No internal state in the store (functional agents)
- Data-driven / constraint driven synchronization
- Blocking Ask
- Determinate case
40Activity Creation ( NEWACT )
a
Active(a,s)
newactActive(a,s)
41Activity Creation ( NEWACT )
a
Active(a,s)
newactActive(a,s)
42Equivalence Modulo Futures Updates
a
f1
b
g
f2
f3
43Equivalence Modulo Futures Updates
a
a
f2
f1
b
g
b
g
f2
f3
44Store Partitioning
45Request Service ( SERVE )
b
Serve(foo)
bar
foo
Serve(foo)...
46Request Service ( SERVE )
b
Serve(foo)
bar
foo
...
Serve(foo)...
47Objectives
- Model of the following features
- Object orientation (activities, communications)
- Asynchronous communications with futures
- Service policy
- Confluence and determinacy
- Identify sources of non-determinism
- Characterize equivalent executions
- Give general properties
- Find some properties easy to verify
48End Of Service ( ENDSERVICE )
b
value
foo
bar
...
49End Of Service ( ENDSERVICE )
b
value
bar
foo
...
50(No Transcript)