Denis Caromel1 Denis Caromel, Romain Quilici OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice...

78
Denis Caromel 1 Denis Caromel, Romain Quilici www.inria.fr/oasis/ProActive OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira, Portugal 14-19 June 2003 1. Distributed and Asynchronous Objects, Groups 2. Components, XML Deployment 3. Graphical Interface (IC2D) 4. Towards PSE ProActive: From Active Objects to Components, Towards PSE

Transcript of Denis Caromel1 Denis Caromel, Romain Quilici OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice...

Page 1: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 1

Denis Caromel, Romain Quiliciwww.inria.fr/oasis/ProActive

OASIS TeamINRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis

Albufeira, Portugal 14-19 June 2003 1. Distributed and Asynchronous Objects, Groups2. Components, XML Deployment3. Graphical Interface (IC2D)4. Towards PSE

ProActive: From Active Objects to Components, Towards PSE

Page 2: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 2

PSEs: High Level View

• PSE = User Interface + libraries + knowledge base + integration(Rice, Boisvert 1996)

• Needs for scalability, software reuse, cost effective, flexibility,

extensibility, …(non exhaustive)

• Must cope with heterogeneous languages, environment, resources,

…(non exhaustive)

ProActive, with its programming and component model, interactive environment could be one of the brick

towards PSEs

Page 3: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 3

• A uniform framework: An Active Object pattern

• A formal model behind: Prop. Determinism, insensitivity to deploy.

Main features:• Remotely accessible Objects ( RMI, JINI, --> UDDI, -->LDAP )• Asynchronous Communications with synchro: automatic Futures • Group Communications, Migration (mobile computations)• XML Deployment Descriptors• Interfaced with various protocols: rsh,ssh,LSF,Globus, --> SOAP• Graphical Visualization and monitoring: IC2D

In the www. ObjectWeb .org Consortium (Open Source middleware) since April 2002 (LGPL license)

ProActive: A Java API + Tools for Parallel, Distributed Computing

Page 4: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 4

ProActive : model• Active objects : coarse-grained structuring entities (subsystems)

• Each active object: - possibly owns many passive objects

- has exactly one thread.

• No shared passive objects -- Parameters are passed by deep-copy

• Asynchronous Communication between active objects

• Future objects and wait-by-necessity.

• Full control to serve incoming requests (reification)

Page 5: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 5

An object created with A a = new A (obj, 7);

can be turned into an active and remote object:

• Instantiation-based:A a = (A)ProActive.newActive(«A», params, node);

The most general case.

To get Class-based: a static method as a factory To get a non-FIFO behavior (Class-based):

class pA extends A implements RunActive { … }

• Object-based:A a = new A (obj, 7);

... ...

a = (A)ProActive.turnActive (a, node);

ProActive : Creating active objects

Page 6: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 6

Two key features:• Polymorphism between standard and active objects

• Type compatibility for classes (and not only interfaces)• Needed and done for the future objects also• Dynamic mechanism (dynamically achieved if needed)

• Wait-by-necessity: inter-object synchronization• Systematic, implicit and transparent futures

Ease the programming of synchronizations, and the reuse of routines

"A"

"pA"

ap_a

foo (A a){ a.g (...); v = a.f (...); ... v.bar (...);}

ProActive: Reuse and seamless

Page 7: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 7

ProActive: Reuse and seamlessTwo key features:• Polymorphism between standard and active objects

• Type compatibility for classes (and not only interfaces)• Needed and done for the future objects also• Dynamic mechanism (dynamically achieved if needed)

• Wait-by-necessity: inter-object synchronization• Systematic, implicit and transparent futures (“value to come”)

Ease the programming of synchronizations, and the reuse of routines

"A"

"pA"

ap_a

foo (A a){ a.g (...); v = a.f (...); ... v.bar (...);}

O.foo(a) : a.g() and a.f() are « local »

O.foo(p_a): a.g() and a.f()are «remote + Async.»

O

Page 8: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 8

ProActive Groups: Collective Communications

Typed and polymorphic Groups of active and remote objectsDynamic generation of group of resultsLanguage centric, Dot notation

• Manipulate groups of Active Objects, in a simple and typed manner:

• Be able to express high-level collective communications (like in MPI):• broadcast, • scatter, gather, • all to all

A ag=(A)ProActiveGroup.newActiveGroup(«A»,{{p1},...},{Nodes,..});V v = ag.foo(param); v.bar();

Page 9: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 9

Construction of a Result Group

Typed Group Java or Active Object

A ag = newActiveGroup (…)V v = ag.foo(param); v.bar();

V

A

Page 10: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 10

ProActive : Mobility of active objects

Migration is initiated by the active object itself through a primitive: migrateTo

Can be initiated from outside through any public method

The active object migrates with:• all pending requests• all its passive objects • all its future objects

Automatic and transparent forwarding of:• requests (remote references remain valid)• replies (its previous queries will be fulfilled)

Page 11: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 11

Characteristics and optimizations

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

Page 12: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 12

Characteristics and optimizations

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

Page 13: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 13

Characteristics and optimizations

direct

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

Page 14: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 14

Characteristics and optimizations

direct

direct

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

Page 15: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 15

Characteristics and optimizations

direct

direct

forwarder

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

Page 16: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 16

Characteristics and optimizations

direct

direct

forwarder

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

Page 17: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 17

Characteristics and optimizations

direct

direct

forwarder

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

Page 18: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 18

Characteristics and optimizations

Same semantics guaranteed (RDV, FIFO order point to point, asynchronous)

Safe migration (no agent in the air!)

Local references if possible when arriving within a VM

Tensionning (removal of forwarder)

direct

direct

forwarder

Page 19: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 19

Software Components

A component in a given infrastructure is:

• a software module,

• with a standardized description of what it needs and provides,

• to be manipulated by tools for Composition and Deployment

Page 20: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 20

A CORBA Component

MyBusiness

Component

Component interface

Facets

Eventsources

Eventsinks

Attributes

Receptacles

OF

FE

RE

DR

EQ

UIR

ED

Courtesy of Philippe Merle, Lille, OpenCCM platform

Page 21: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 21

Building CCM Applications =Assembling CORBA Component Instances

Provide+Use, but flat assembly

Page 22: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 22

Composite Components

Composition of components

to build new component:

Composite (vs. Primitif)

Cp. Inside Cp.

Composite components:

- Internal interfaces

- Internal Bindings

- Imbrication

- IN/OUT operations

- Controllers

- Life cycle Mng.

--> Reconfiguration

D

C

A

B

C

B

A

Page 23: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 23

Conclusion on the basics:Component Orientedness

• Level 1: Instantiate - Deploy - Configure• Simple Pattern

• Meta-information (file, XML, etc.) JavaBeans, EJB

• Level 2: Assembly (flat)• Server and client interfaces CCM

• Level 3: Hierarchic• Composite Fractal

• Level 4: Reconfiguration• Binding, Inclusion, Location On going work …

Interactions / Communications:

Functional Calls: service, event, stream

Non-Functional: instantiate, deploy, start/stop, inner/outer, re-bind

Page 24: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 24

B

B

C

D

Towards GRID Components

Collections are essential:

--> Group Communications

--> Collective Interfaces

Parallel component

vs. Distributed:

A given component

instance can be

distributed over

machines

Reconfigurations:

bindings, in/out

B

B

B’

D

C B

A

A

Page 25: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 25

ProActive Components

- Principles for Distributed Components

- Abstract Deployment model

- Composing Virtual Nodes

- Descriptors: Primitive and Composite

Page 26: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 26

ProActive Component DefinitionA component is:

• Formed from one (or several) Active Object

• Executing on one (or several) JVM

• Provides a set of server ports (Java Interfaces)

• Uses a set of client ports (Java Attributes)

• Point-to-point or Group communication between components

Hierarchical:• Primitive component: define with Java code and a descriptor

• Composite component: composition of primitive components

Descriptor:• XML definition of primitive and composite

• Virtual node captures the deployment capacities and needs

Virtual Node is a very important abstraction for GRID components

Page 27: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 27

Components vs. Activity and JVMs

Activity JVM Component

A B1

C

B2

B3

Cp. are rather orthogonal to activities and JVMs: contain activities, span across several JVMs

Here, co-allocation of components,

within a composite one,

with a collective port, using group com.

Components are a way to globally manipulate

distributed, and running activities

Page 28: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 28

Abstract Deployment Model Objectives

Problem:• Difficulties and lack of flexibility in deployment

• Avoid scripting for: configuration, getting nodes, connecting, etc.

A key principle: • Abstract Away from source code:

• Machines

• Creation Protocols

• Lookup and Registry Protocols

Context:• Grid

• Distributed Objects, Java

• Not legacy-code driven, but adaptable to it

Page 29: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 29

Descriptors: based on Virtual NodesVirtual Node (VN):

• Identified as a string name

• Used in program source

• Configured (mapped) in an XML descriptor file --> Nodes

Operations specified in descriptors:

• Mapping of VN to JVMs (leads to Node in a JVM on Host)

• Register or Lookup VNs

• Create or Acquire JVMs

Program Source Descriptor (RunTime)|----------------------------------| |-------------------------------------------|Activities (AO) --> VN VN --> JVMs --> Hosts

Runtime structured entities: 1 VN --> n Nodes in n JVMs

Page 30: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 30

Descriptors: Mapping Virtual NodesComponent Dependencies:

Provides: … Uses: ...

VirtualNodes:

Dispatcher <RegisterIn RMIregistry, Globus, Grid Service, … >

RendererSet

Mapping:

Dispatcher --> DispatcherJVM

RendererSet --> JVMset

JVMs:

DispatcherJVM = Current // (the current JVM)

JVMset=//ClusterSophia.inria.fr/ <Protocol GlobusGram … 10 >

...

Page 31: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 31

Descriptors: Virtual Nodes in Programs

Descriptor pad = ProActive.getDescriptor ("file:.ProActiveDescriptor.xml");

VirtualNode vn = pad.activateMapping ("Dispatcher"); // Triggers the JVMs

Node node = vn.getNode(); ... C3D c3d = ProActive.newActive("C3D", param, node);

log ( ... "created at: " + node.name() + node.JVM() + node.host() );

Page 32: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 32

Descriptors: Virtual Nodes in Programs

Descriptor pad = ProActive.getDescriptor ("file:.ProActiveDescriptor.xml");

VirtualNode vn = pad.activateMapping ("Dispatcher"); // Triggers the JVMs

Node node = vn.getNode(); ... C3D c3d = ProActive.newActive("C3D", param, node);

log ( ... "created at: " + node.name() + node.JVM() + node.host() );

// Cyclic mapping: set of nodes VirtualNode vn = pad.activateMapping ("RendererSet");

while ( … vn.getNbNodes … ) {

Node node = vn.getNode();

Renderer re = ProActive.newActive(”Renderer", param, node);

Page 33: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 33

Composing Virtual Nodes

When composing at runtime A and B

to form C.

VNa , VNb --> 2 VNs :

Distributed mapping

Activity JVM ComponentA B

VNa VNbC

Page 34: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 34

Composing Virtual Nodes

VNa , VNb --> VNa+b : Co-allocation

Composition of VNs can control

distribution of composite

Co-allocation in a composite

Activity JVM Component

C

A B

VNa VNb

VNa+b

Page 35: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 35

Descriptor Example: Composite Component

<composite-component name="composite2" virtualNode="Node2"> <provides> <interface-type name="controlComposite2" signature="test.component.car.Motor" /> </provides> <composite-component name="composite1" virtualNode="Node2">

<provides> <interface-type name="controlComposite1” signature="test.component.car.Motor" />

</provides> <primitive-component …..

Not to be written nor read by humans !!TOOLS

Page 36: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 36

ProActive Components: Characteristics

Components characteristics:

Software module = • Java Classes and Interfaces + threads: forming Active Objects

Standardized description =• In source: Virtual Nodes, newActive API• .ProActiveDescriptor : an XML file per component

Tools: • Composition = working on: IC2D--Compose• Deployment = Java VM, and IC2D (Deploy + Monitor)

Page 37: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 37

IC2D: Interactive Control and Debugging of Distribution

Page 38: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 38

IC2D: Basic featuresGraphical Visualization:

• Hosts, Java Virtual Machines, Nodes, Active Objects • Topology: reference and communications • Status of active objects (executing, waiting, etc.) • Migration of activities

Page 39: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 39

IC2D: Basic featuresGraphical Visualization:

• Hosts, Java Virtual Machines, Nodes, Active Objects • Topology: reference and communications • Status of active objects (executing, waiting, etc.) • Migration of activities

Textual Visualization:• Ordered list of messages, Logical Clock • Status: waiting for a request or for a data • Causal dependencies between messages • Related events (corresponding send and receive, etc.)

Page 40: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 40

IC2D: Basic featuresGraphical Visualization:

• Hosts, Java Virtual Machines, Nodes, Active Objects • Topology: reference and communications • Status of active objects (executing, waiting, etc.) • Migration of activities

Textual Visualization:• Ordered list of messages, Logical Clock • Status: waiting for a request or for a data • Causal dependencies between messages • Related events (corresponding send and receive, etc.)

Control and Monitoring:• Drag and Drop migration of executing tasks • Creation of additional JVMs and nodes

Page 41: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 41

Next steps

• Interactively compose components with the component view

• Maintain component view at execution

• Formal Semantics of mixing:

• Functional, with

• Non Functional calls (start/stop, rebind, in/out, …)

Page 42: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 42

Towards PSEs: Today!ProActive Middleware already addresses some issues for PSEs

development

• ProActive is Grid enabled (Globus, LSF, …), and provides machine-independent deployment model (VirtualNodes abstraction)

Page 43: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 43

Towards PSEs: Today!ProActive Middleware already addresses some issues for PSEs

development

• ProActive is Grid enabled (Globus, LSF, …), and provides machine-independent deployment model (VirtualNodes abstraction)

• ProActive Component Model: Composing instead of Programming

PSEs will rely on a component model to feature plug-and-play paradigm, reusability, composition, flexibility, components combination, modularity, …

Page 44: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 44

Towards PSEs: Today!ProActive Middleware already addresses some issues for PSEs

development

• ProActive is Grid enabled (Globus, LSF, …), and provides machine-independent deployment model (VirtualNodes abstraction)

• ProActive Component Model: Composing instead of Programming

PSEs will rely on a component model to feature plug-and-play paradigm, reusability, composition, flexibility, components combination, modularity, …

• IC2D as User Graphical Interface to control, monitor, create local or remote objects

Page 45: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 45

Towards PSEs: Today!ProActive Middleware already addresses some issues for PSEs

development

• ProActive is Grid enabled (Globus, LSF, …), and provides machine-independent deployment model (VirtualNodes abstraction)

• ProActive Component Model: Composing instead of Programming

PSEs will rely on a component model to feature plug-and-play paradigm, reusability, composition, flexibility, components combination, modularity, …

• IC2D as User Graphical Interface to control, monitor, create local or remote objects

• ProActive objects are created and accessible remotely: RMI, JINI, UDDI(Web Services)

Page 46: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 46

Towards PSEs: Today!ProActive Middleware already addresses some issues for PSEs

development

• ProActive is Grid enabled (Globus, LSF, …), and provides machine-independent deployment model (VirtualNodes abstraction)

• ProActive Component Model: Composing instead of Programming

PSEs will rely on a component model to feature plug-and-play paradigm, reusability, composition, flexibility, components combination, modularity, …

• IC2D as User Graphical Interface to control, monitor, create local or remote objects

• ProActive objects are created and accessible remotely: RMI, JINI, UDDI(Web Services)

• Hierarchical and Dynamic Groups for performance improvements, Grid and large scale applications

Page 47: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 47

Towards PSEs: Today!ProActive Middleware already addresses some issues for PSEs

development

• ProActive is Grid enabled (Globus, LSF, …), and provides machine-independent deployment model (VirtualNodes abstraction)

• ProActive Component Model: Composing instead of Programming

PSEs will rely on a component model to feature plug-and-play paradigm, reusability, composition, flexibility, components combination, modularity, …

• IC2D as User Graphical Interface to control, monitor, create local or remote objects

• ProActive objects are created and accessible remotely: RMI, JINI, UDDI(Web Services)

• Hierarchical and Dynamic Groups for performance improvements, Grid and large scale applications

• Migration capabilities

Page 48: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

48Denis Caromel

Towards PSEs: Tomorrow!

ProActive future improvements will fit some PSEs requirements

• Complete Component model

• IC2D components view will allow full control on components composition, integration, activities,…

- IC2D-Compose

- IC2D-Deploy/Monitor

• IC2D pluggings to build dedicated PSEs

• Wrapping as ProActive Components of legacy codes(compose and deploy)

• Components acquisition through Web Services(UDDI) and published as solvers (compose only)

Page 49: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 49

Conclusion A huge work still to be done(non exhaustive !!!)

– ProActive is not a domain-dedicated PSE– Higher level and specifics PSEs still to be built– Application intelligence to be added– TestBed– Databases access – Still need to code primitive components – Functional interface useful, but Behaviour description needed for effective composition – …

Page 50: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 50

Conclusion A huge work still to be done(non exhaustive !!!)

– ProActive is not a domain-dedicated PSE– Higher level and specifics PSEs still to be built– Application intelligence to be added– TestBed– Databases access – Still need to code primitive components – Functional interface useful, but Behaviour description needed for effective composition – …

Other technologies (Portlets, … ) to be needed and to interact with ProActive

BUT

ProActive could play a key role for software reuse and integration to build PSEs

Page 51: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 51

DEMO: Components with the IC2D monitor

• A simple Motors and Wheels demo case

• Parallel:– several instances of components with collective interface

• Composite:– 3 levels of imbrication

• Level 4 component orientedness:– life cycle management, rebinding, in and out

Page 52: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 52

WP1

WP2

WP3

M1

M2

Motors and Wheels demo case

WP4

WP5

W1

W2

composite2composite1

WP6 parallel2

parallel1

Page 53: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 53

Motors and Wheels demo casecomposite1

composite2

WP1

WP2

WP3

M1

M2

WP4

WP5

W1

W2

WP6 parallel2

parallel1

Page 54: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 54

Motors and Wheels demo casecomposite2

M1

M2

W1

W2

WP1

WP2

WP3

parallel2

composite1

Page 55: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 55

Component Manipulation

Selecting: component and deployment descriptorsDEPLOY

Managing: life cycle, rebinding, in and out

Page 56: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 56

Component Interface with IC2D

Page 57: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 57

Conclusion -- PerspectivesNot all models are equivalent: Component Orientedness

Level 1: Configuration 2: Assembly 3: Hierarchic 4:Reconfiguration

Specificity for GRID Components:• Parallel (HPC), Distributed, Collective Op., Deployment, … Reconfiguration

Can programming models be independent of (Grid) Components ?• Do not target the same objectives• But can components … compose, … reconfigure without a clear model ?

Reconfiguration is the next big issue:• Life cycle management, but with direct communications as much as possible• For the sake of reliability and fault tolerance ---> GRID

– Error, Exception handling across components– Checkpointing: independent, coordinated, memory channel, ...

Other pending issues:• Peer-to-peer (even more volatile … reconfiguration is a must), Security, ...

Page 58: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 58

Adaptive GRIDThe need for adaptive middleware is now acknowledged,

with dynamic strategies at various points in containers, proxies, etc.

Can we afford adaptive GRID ?

with dynamic strategies at various points

(communications, checkpointing, reconfiguration, …)

for various conditions (LAN, WAN, network, P2P, ...)

HPC vs. HPC

High Performance Components vs. High Productivity Components

Page 59: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 59

ProActive : API for Mobile Agents

• Mobile agents (active objects) that communicate

• Basic primitive: migrateTo

• public static void migrateTo (String u)// string to specify the node (VM)

• public static void migrateTo (Object o)// joinning another active object

• public static void migrateTo (Node n)// ProActive node (VM)

• public static void migrateTo (JiniNode n)// ProActive node (VM)

Page 60: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 60

ProActive : API for Mobile Agents• Mobile agents (active objects) that communicate// A simple agentclass SimpleAgent implements Active, Serializable { public SimpleAgent () {}

public void moveTo (String t){ // Move upon requestProActive.migrateTo (t)

}

public String whereAreYou (){ // Repplies to queriesreturn (“I am at ” + InetAddress.getLocalHost ());

}

public Live(Body myBody){ while (… not end of iterator …){

res = myFriend.whatDidYouFind () // Query other agents …

} myBody.fifoPolicy(); // Serves request, potentially moveTo

} }

Page 61: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 61

ProActive : API for Mobile Agents• Mobile agents that communicate

• Primitive to automatically execute action upon migration

• public static void onArrival (String r)// Automatically executes the routine r upon arrival

// in a new VM after migration

• public static void onDeparture (String r)// Automatically executes the routine r upon migration

// to a new VM, guaranted safe arrival

• public static void beforeDeparture (String r)// Automatically executes the routine r before trying a migration

// to a new VM

Page 62: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 62

ProActive : API for Mobile Agents Itinerary abstraction

Itinerary : VMs to visit• specification of an itinerary as a list of (site, method)

• automatic migration from one to another

• dynamic itinerary management (start, pause, resume, stop, modification, …)

API:• myItinerary.add (“machine1’’, “routineX”); ...

• itinerarySetCurrent, itineraryTravel, itineraryStop, itineraryResume, …

Still communicating, serving requests:• itineraryMigrationFirst ();

// Do all migration first, then services, Default behavior

• itineraryRequestFirst ();

// Serving the pending requests upon arrival before migrating again

Page 63: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 63

Collective Operations : Exampleclass A {…

V foo(P p){...}

}

class B extends A { ...}

A a1=PA.newAct(A,);

A a2=PA.newAct(A,);

B b1=PA.newAct(B,);

// Build a group of « A »

A ag = (A)ProActiveGroup.newGroup(« A », {a1,a2,b1})

V v = ag.foo(param); // foo(param) invoked // on each member

// A group v of result of type V is created

v.bar();

// starts bar() on each member of the result group upon arrival

ProActiveGroup.waitForAll(v); //bloking -> all

v.bar();//Group call

V vi = ProActiveGroup.getOne(v); //bloking -> onvi.bar(); //a single call

A a3=PA.newAct(A,);

// => modif. of group ag :

Group ga = ProActiveGroup.getGroup(ag);

ga.add(a3);

//ag is updated

Page 64: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 64

1.6 IC2D

Interactive Control & Debug for Distribution

Features:• Graphical visualization

• Textual visualization

• Monitoring and Control

Page 65: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 65

Page 66: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 66

Page 67: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 67

Page 68: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 68

IC2D: Interactive Control and Debugging of Distribution

Main Features:

- Hosts, JVM,

- Nodes

- Active Objects

- Topology

- Migration

- Logical Clock

Page 69: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 69

Motors and Wheels demo casecomposite1

composite2

WP1

WP2

WP3

M1

M2

WP4

WP5

W1

W2

WP6 parallel2

parallel1

Page 70: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 70

Monitoring of RMI, Globus, Jini, LSF cluster Nice -- Baltimore at SC’02

Width of links

proportional

to the number

of com-

munications

Page 71: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 71

IC2D: Related Events

Events:• Textual and ordered list of events for each Active Object

• Logical clock: related events, ==> Gives a Partial Order

Page 72: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 72

IC2D: Dynamic change of DeploymentNew JVMs

Creation,

Acquisition

of

new JVMs,

and Nodes

Protocols:

rsh, ssh

Globus,

LSF

Page 73: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 73

IC2D: Dynamic change of DeploymentDrag-n-Drop Migration

Drag-n-Drop

tasks

around the

world

Page 74: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 74

IC2D: Cluster Visualization

Visualization

of 2 clusters

(1Gbits links)

Featuring

the current

communications

(proportional)

Page 75: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 75

Wrappers on legacy code

Virtual Node

host1

jvm

host7host6

host5host4

host3host2

ProActive Node Wrapper

MPI

MPI

MPI

MPI

JNI JNI

MPI

Primitive Component Parallel

Data or Control

Page 76: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 76

Towards GRID Components

Plus specificity :• High performance

• Communication :

• Important Bandwidth

• Very High Latency

• Deployment complexity: --> Abstractions• Various remote execution tools (rsh, ssh, Globus, Web Services)

• Various registry and lookup protocols (LDAP, RMI, WS, etc.)

• Large variations in nodes being used (1 to 5000, … 200 000)

• Debugging, Monitoring, and Reconfiguring

• Across the world ??

High-Performance a specificity ?

Not sure: an EJB component handling

1 000 000 of requests already needs

High-Performance!

Networks grow faster than Procs

Techniques for hiding it

Parallel and Distributed:--> Group Communications

Page 77: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 77

Programming vs. Composing

The underlying model of parallel and distributed computing being

used is FUNDAMENTAL.

How to build components that actually compose:• semantics, correctness,

• efficiency, predictability of performance, ...

without a clearly defined programming model ?

For 50 years, Computer Science have been looking for abstractions

that compose: functions, modules, classes, objects, …

The semantics of a composite is solely and well defined from the

semantics of inner components. The quest is not over !

Page 78: Denis Caromel1 Denis Caromel, Romain Quilici  OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Albufeira,

Denis Caromel 78

Towards Distributed Components

Typed Group Java Object

A ag = newActiveGroup (…)V v = ag.foo(param); v.bar();

V

A

Active Objects

Example of

component

instance

Compose

Deploy

Monitor-

Control

at the

component

level

Components