Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

21
Denis Caromel 1 Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team INRIA -- CNRS - I3S – Univ. of Nice Sophia-Antipolis, IUF Keynote talk at Formal Aspects of Component Systems, FACS, Prague, Sept. 2006 Theory to Practice in Distributed Component Systems

description

Theory to Practice in Distributed Component Systems. Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team INRIA -- CNRS - I3S – Univ. of Nice Sophia-Antipolis, IUF Keynote talk at Formal Aspects of Component Systems, FACS, Prague, Sept. 2006. - PowerPoint PPT Presentation

Transcript of Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Page 1: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 1

Denis CaromelJoint work with Ludovic Henrio – Eric Madelaine et.

OASIS members

OASIS TeamINRIA -- CNRS - I3S –

Univ. of Nice Sophia-Antipolis, IUF

Keynote talk at Formal Aspects of Component Systems, FACS, Prague, Sept. 2006

Theory to Practice in Distributed Component Systems

Page 2: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 2

Denis CaromelJoint work with Ludovic Henrio – Eric Madelaine et.

OASIS members

Theory to Practice in Distributed Component Systems

1. Distributed Objects: Active Objects2. Calculus: ASP3. Dist. Component Specification: GCM4. Middleware: ProActive5. Model Checking: Vercors

Statement a: Prog. Language – Model / Semantics Statement b.: Active Objects

Page 3: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 3

Denis CaromelJoint work with Ludovic Henrio – Eric Madelaine et.

OASIS members

Practice to Theory to Practice in Distributed Component Systems

1. Distributed Objects: Active Objects2. Calculus: ASP3. Dist. Component Specification: GCM4. Middleware: ProActive5. Model Checking: Vercors

Statement a: Prog. Language – Model / Semantics Statement b.: Active Objects

Page 4: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 4

Features for Scalable, Distributed

Objects and Components

• Asynchronous Calls

• 1st Class Futures

• Typed Groups

Page 5: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 5

Features for Component Verifications

• Wait-by-Necessity

• Future Update can occur anytime (no consequences)

• No sharing

• No user-, code-level, concurrency and parallelism

• Insensitive Semantics to Distribution / Location

Page 6: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 6

1. Active Objects

Programming

Page 7: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 7

ProActive model (1)Java RMI (Remote Method Invocation = Object RPC = o.foo(p) )

plus a few important features:• Asynchronous Method calls towards Active Objects:

Implicit Futures as RMI results• Wait-By-Necessity:

• Automatic wait upon the use of an implicit future• First-Class Futures: - Futures passed to other activities - Sending a future is not blocking

Page 8: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 8

A

ProActive : Active objects

Proxy

Java Object

A ag = newActive (“A”, […], VirtualNode)V v1 = ag.foo (param);V v2 = ag.bar (param);...v1.bar(); //Wait-By-Necessity

V

Wait-By-Necessity

is a

Dataflow

Synchronization

JVM

A

JVM

Active Object

Future Object Request

Req. Queue

Thread

v1v2 ag

WBN!

Page 9: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 9

Call between Objects: Parameter Passing: Active Objects

ba

x

Copy:at serialization

Object passed by Deep Copy - Active Object by Reference

b.foo(x, c)

c

c

Reference Passing

Page 10: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 10

Interleaving-Free

Synchronizations

Page 11: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 11

ProActive : Intra-object synchronizationExplicit control: Library of service routines:

• Non-blocking services,...• serveOldest ();• serveOldest (f);

• Blocking services, timed, etc.• serveOldestBl ();• serveOldestTm (ms);

• Waiting primitives• waitARequest(); • etc.

class BoundedBuffer extends FixedBuffer implements RunActive {

// Programming Non FIFO behavior

runActivity (ExplicitBody myBody) { while (...) { if (this.isFull()) serveOldest("get"); else if (this.isEmpty()) serveOldest ("put"); else serveOldest ();

// Non-active wait waitArequest (); }}}

Implicit (declarative) control: library classese.g. : Blocking Condition Abstraction for concurrency control:

doNotServe ("put", "isFull");

Page 12: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 12

First-Class Futures

Update

Page 13: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 13

Wait-By-Necessity: First Class Futures

ba

Futures are Global Single-Assignment Variables

V= b.bar ()

c

c

c.gee (V)

v

v

b

Page 14: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 14

Future update strategies

No partial replies and requests:

• No passing of futures between activities, more deadlocks

Eager strategies: as soon as a future is computed

• Forward-based: – Each activity is responsible for updating the values of futures it has forwarded

• Message-based: – Each forwarding of future generates a message sent to the computing activity

– The computing activity is responsible for sending the value to all

Mixed strategy:

• Futures update any time between future computation and WbN

Lazy strategy:

• On demand, only when the value of the future is needed (WbN on it)

Page 15: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 15

Wait-By-Necessity: Eager Forward Based

ba

AO forwarding a future: will have to forward its value

V= b.bar ()

c

c

c.gee (V)

v

v

b

Page 16: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 16

Wait-By-Necessity: Eager Message Based

ba

AO receiving a future: send a message

V= b.bar ()

c

c

c.gee (V)

v

v

b

Page 17: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 17

Wait-By-Necessity: Lazy Strategy

ba

An Active Object requests a Future Value when needed

V= b.bar ()

c c.gee (V)

v

v c

Page 18: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 18

TYPED

ASYNCHRONOUS

GROUPS

Page 19: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 19

A

Creating AO and Groups

Typed Group Java or Active Object

A ag = newActiveGroup (“A”, […], VirtualNode)V v = ag.foo(param);...v.bar(); //Wait-by-necessity

V

Group, Type, and Asynchrony

are crucial for Cpt. and GRID

JVM

Page 20: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 20

Broadcast and Scatter

JVM

JVM

JVM

JVM

agcg

ag.bar(cg); // broadcast cgProActive.setScatterGroup(cg);ag.bar(cg); // scatter cg

c1 c2c3c1 c2c3

c1 c2c3c1 c2c3

c1 c2c3

c1 c2c3

s

c1 c2c3

s

Page 21: Denis Caromel Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team

Denis Caromel 21

next