Grille: la plate-forme ObjectWeb ProActive Denis Caromel Institut - - PowerPoint PPT Presentation

grille la plate forme objectweb proactive
SMART_READER_LITE
LIVE PREVIEW

Grille: la plate-forme ObjectWeb ProActive Denis Caromel Institut - - PowerPoint PPT Presentation

Grille: la plate-forme ObjectWeb ProActive Denis Caromel Institut Universitaire de France (IUF) OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis GridUse, june 2004 1. LES GrilleS 2. Objets Rpartis et Asynchrones 3.


slide-1
SLIDE 1

Denis Caromel 1

Denis Caromel Institut Universitaire de France (IUF)

OASIS Team

INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis

GridUse, june 2004

Grille: la plate-forme ObjectWeb ProActive

  • 1. LES GrilleS
  • 2. Objets Répartis et Asynchrones
  • 3. Composants répartis, parallèles et hiérarchiques
  • 4. Déploiement, Environnements interactifs
  • 5. Exemples d’applications ProActive
  • 6. Vrais Systèmes P2P en action
slide-2
SLIDE 2

Denis Caromel 2

Programming

ProActive:

a global solution for the GRID

Composing Deploying W r a p p i n g

Figures: Web Page Hits: ~ 1K-2K months, Downoad: 150-300 / month, Users: ?? us, mx, br, cl, ch, it, ...

slide-3
SLIDE 3

Denis Caromel 3

slide-4
SLIDE 4

Denis Caromel 4

Enterprise Grids

Internet

EJB Servlets Apache Databases

slide-5
SLIDE 5

Denis Caromel 5

Scientific Grids

Internet

Clusters Parallel Machine Large Equipment

slide-6
SLIDE 6

Denis Caromel 6

Internet Grids

Internet

Job management for embarrassingly parallel application (e.g. SETI)

slide-7
SLIDE 7

Denis Caromel 7

The multiple GRIDs

  • Scientific Grids
  • Enterprise Grids
  • Intranet and Internet Grids

Strong convergence in process!

At least at the infrastructure level, i.e. WS

slide-8
SLIDE 8

Denis Caromel 8

Grid: from enterprise ... to regional

Very hard deployment problems … right from the beginning

slide-9
SLIDE 9

Denis Caromel 9

Grid: from regional ... to worldwide

Communication Supélec-Los Angeles: 70 ms Light Speed Challenge: Hide the latency !

Define adequate programming model

slide-10
SLIDE 10

Denis Caromel 10

Distributed Objects and Components ProActive

Programming

slide-11
SLIDE 11

Denis Caromel 11

Model:

  • Remote Mobile Objects, Group Communications
  • Asynchronous Communications with synchro: automatic Futures
  • OO SPMD, Migration, Non Functional Exceptions (NFE)

Environment:

  • XML Deployment, dynamic class-loading, PKI security
  • Various protocols: rsh,ssh,LSF,Globus,BPS, ...
  • Graphical Visualization and monitoring: IC2D

ProActive: A Java API + Tools for the GRID

Parallel, Distributed, Mobile, Activities, across the world !

SMP Clusters LAN Desktop

slide-12
SLIDE 12

Denis Caromel 12

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

slide-13
SLIDE 13

Denis Caromel 13

Explicit Synchronizations

Single Future Synchronization:

  • ProActive.isAwaited (v);
  • .waitFor (v);

Vectors of Futures:

  • .waitForAll (Vector); // getOne
  • .waitForAny (Vector);

Group Synchronization:

  • ProActiveGroup.waitOne(groupB); // getOne
  • .waitAll(groupB);

Group Predicates:

  • noneArrived, kArrived(i), allAwaited, ...

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

slide-14
SLIDE 14

Denis Caromel 14

Seamless Reuse / Granularity Control

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" a p_a foo (A a) { a.g (...); v = a.f (...); ... v.bar (...); }

slide-15
SLIDE 15

Denis Caromel 15

ProActive : Reuse and seamless

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 (“value to come”)

Ease the programming of synchronizations, and the reuse of routines

"A" "pA" a p_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

slide-16
SLIDE 16

Denis Caromel 16

Standard system at Runtime

slide-17
SLIDE 17

Denis Caromel 17

Mobility

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)

slide-18
SLIDE 18

Denis Caromel 18

Mobility

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)

slide-19
SLIDE 19

Denis Caromel 19

Mobility

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

slide-20
SLIDE 20

Denis Caromel 20

Mobility

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

slide-21
SLIDE 21

Denis Caromel 21

Mobility

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

slide-22
SLIDE 22

Denis Caromel 22

Mobility

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

slide-23
SLIDE 23

Denis Caromel 23

Mobility

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

slide-24
SLIDE 24

Denis Caromel 24

Mobility

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

slide-25
SLIDE 25

Denis Caromel 25

Parallel, Distributed, Hierarchical for the Grid Composing

slide-26
SLIDE 26

Denis Caromel 26

A CORBA Component

My Business Component Component interface Facets Event sources Event sinks Attributes Receptacles OFFERED REQUIRED

Courtesy of Philippe Merle, Lille, OpenCCM platform

slide-27
SLIDE 27

Denis Caromel 27

Building CCM Applications = Assembling CORBA Component Instances

Provide + Use, but flat assembly

slide-28
SLIDE 28

Denis Caromel 28

Content Controller

The Fractal model: Hierarchical Component

Defined by E. Bruneton, T. Coupaye, J.B. Stefani, INRIA & FT

slide-29
SLIDE 29

Denis Caromel 29

Content Controller

Interface = access point

slide-30
SLIDE 30

Denis Caromel 30

Content Controller

Hierarchical model : composites encapsulate primitives encapsulate Java code

slide-31
SLIDE 31

Denis Caromel 31

Content Controller

Binding = interaction

slide-32
SLIDE 32

Denis Caromel 32

Binding = interaction

Content Controller

slide-33
SLIDE 33

Denis Caromel 33

Controllers : non-functional properties

Component Identity Binding Controller LifeCycle Controller Content Controller

Content Controller

Component = runtime entity

slide-34
SLIDE 34

Denis Caromel 34

  • 3. Parallel and composite

component

  • 1. Primitive component
  • 2. Composite component

ProActive Components for the GRID

An activity, a process, … potentially in its own JVM

C D Composite: Hierarchical, and Distributed over machines Parallel: Composite

+ Broadcast (group)

slide-35
SLIDE 35

Denis Caromel 35

ProActive Component Definition

A 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 + composite
  • Parallel component:

multicast of calls in composites

Descriptor:

  • XML definition of primitive and composite (ADL)
  • Virtual nodes capture the deployment capacities and needs

Virtual Node is a very important abstraction for GRID components

slide-36
SLIDE 36

Denis Caromel 36

A A B C P

Group proxy Group proxy

A B C D

Groups in Components

Broadcast at binding,

  • n client interface

At composition,

  • n composite inner server interface

A parallel component!

slide-37
SLIDE 37

Denis Caromel 37

Migration Capability

  • f composites

Migrate sets of components, including composites

slide-38
SLIDE 38

Denis Caromel 38

Migration Capability

  • f composites

Migrate sets of components, including composites

slide-39
SLIDE 39

Denis Caromel 39

Co-allocation, Re-distribution

e.g. upon communication intensive phase

slide-40
SLIDE 40

Denis Caromel 40

Co-allocation, Re-distribution

e.g. upon communication intensive phase

slide-41
SLIDE 41

Denis Caromel 41

Co-allocation, Re-distribution

e.g. upon communication intensive phase

slide-42
SLIDE 42

Denis Caromel 42

Deploying

slide-43
SLIDE 43

Denis Caromel 43

How to deploy on the Various Kind of Grids ?

Internet

EJB Servlets Apache Databases

Internet

Clusters

Parallel Machine

Large Equipment

Internet

Job management for embarrassingly parallel application (e.g. SETI)

slide-44
SLIDE 44

Denis Caromel 44

Abstract Deployment Model

Problem:

  • Difficulties and lack of flexibility in deployment
  • Avoid scripting for: configuration, getting nodes, connecting, etc.

A key principle: Virtual Node (VN) + XML deployment file

  • Abstract Away from source code:
  • Machines
  • Creation Protocols
  • Lookup and Registry Protocols

Protocols and infrastructures:

  • Globus, ssh, rsh, LSF, PBS, … Web Services, WSRF, ...
slide-45
SLIDE 45

Denis Caromel 45

Descriptors: based on Virtual Nodes

Virtual 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

slide-46
SLIDE 46

Denis Caromel 46

Descriptors: Mapping Virtual Nodes

Component 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 > ... Example of an XML file descriptor:

slide-47
SLIDE 47

Denis Caromel 47

Mapping Virtual Nodes: example (1)

<processDefinition id="linuxJVM"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id=”sshProcess"> <sshProcess class="org.objectweb.proactive.core.process.ssh.SSHJVMProcess" hostname="sea.inria.fr"> <processReference refid="linuxJVM"/> </sshProcess> </processDefinition>

Infrastructure informations

JVM on the current Host JVM started using SSH

slide-48
SLIDE 48

Denis Caromel 48

<processDefinition id=" clusterProcess "> <bsubProcess class="org.objectweb.proactive.core.process.lsf.LSFBSubProcess" hostname=”cluster.inria.fr"> <processReference refid=”singleJVM"/> <bsubOption> <processor>12</processor> </bsubOption> </bsubProcess> </processDefinition>

Mapping Virtual Nodes: example (2)

  • Definition of LSF deployment, … Globus
slide-49
SLIDE 49

Denis Caromel 49

C A B

VNa VNb

C A B

VNc = VN(a,b)

XML Deployment (Not in source) Separate or Co-allocation

slide-50
SLIDE 50

Denis Caromel 50

IC2D: Interactive Control and Debugging of Distribution

With any ProActive application Features: Graphical and Textual visualization Monitoring and Control

slide-51
SLIDE 51

Denis Caromel 51

Monitoring of RMI, Globus, Jini, LSF cluster Nice -- Baltimore

ProActive IC2D: Width of links proportional to the number

  • f com-

munications

slide-52
SLIDE 52

Denis Caromel 52

Job Monitoring

slide-53
SLIDE 53

Denis Caromel 53

slide-54
SLIDE 54

Denis Caromel 54

C3D: distributed-//-collaborative

Collaborative 3D, Rendering in //, Application mobility

slide-55
SLIDE 55

Denis Caromel 55

Jem3D

slide-56
SLIDE 56

Denis Caromel 56

JEM 3D : Java 3D Electromagnetism

together with Said El Kasmi, Stéphane Lanteri (caiman)

Maxwell 3D equation solver, Finite Volume Method (FVM)

Pre-existing Fortran MPI version: EM3D (CAIMAN team @ INRIA)

Up to 294 machines at the same time (Intranet and cluster) Large data sets: 150x150x150 (100 million facets)

temps d'exécution de la boucle principale (sur cluster)

100 200 300 400 500 600 700 800 900 10 20 30 40 50 60 70 nombre de processeurs temps (secondes) 21*21*21 31*31*31 43*43*43 55*55*55 81*81*81 97*97*97 113*113*113 121*121*121 taille du maillage

slide-57
SLIDE 57

Denis Caromel 57

Recent Benchmarks

  • Seq. Java/Fortran: 2

Comparison: Jem3D over

  • ProActive/RMI Sun
  • ProActive/RMI Ibis

Em3D in

  • Fortran/MPI

On 16 machines: Fortran: 13.8 ProActive/Ibis: 12 ProActive/RMI: 8.8 Grid experiment on 5 clusters (DAS 2): Speed up of 100 on 150 machines

slide-58
SLIDE 58

Denis Caromel 58

Monte Carlo Simulations, Non-Linear Physics, INLN

slide-59
SLIDE 59

Denis Caromel 59

Electric Network Planning,

  • E. Zimeo et al., Benevento (Naples), Italy

On-line Power Systems Security Analysis (OPSSA)

slide-60
SLIDE 60

Denis Caromel 60

Electric Network Planning,

  • E. Zimeo et al., Benevento (Naples), Italy

On-line Power Systems Security Analysis (OPSSA)

slide-61
SLIDE 61

Denis Caromel 61

Electric Network Planning,

  • E. Zimeo et al., Benevento (Naples), Italy

On-line Power Systems Security Analysis (OPSSA)

slide-62
SLIDE 62

Denis Caromel 62

Electric Network Planning,

  • E. Zimeo et al., Benevento (Naples), Italy

On-line Power Systems Security Analysis (OPSSA)

slide-63
SLIDE 63

Denis Caromel 63

Electric Network Planning,

  • E. Zimeo et al., Benevento (Naples), Italy

On-line Power Systems Security Analysis (OPSSA)

slide-64
SLIDE 64

Denis Caromel 64

P2P N Queens

slide-65
SLIDE 65

Denis Caromel 65

Real

slide-66
SLIDE 66

Denis Caromel 66

Architectures: Server to Peer-To-Peer (P2P)

Internet

EJB Servlets Apache Databases

SOA: Service Oriented Architectures

slide-67
SLIDE 67

Denis Caromel 67

Pure P2P: Definition

Only PEERs, no above everything, top level, server(s) Every peer is, somehow, also a server No master … No slave ! System get organized dynamically, without static configuration Coherent, desired behavior, dynamically emerges

slide-68
SLIDE 68

Denis Caromel 68

P2P Examples (1)

slide-69
SLIDE 69

Denis Caromel 69

P2P can be difficult: need to be fault-tolerant, self healing

slide-70
SLIDE 70

Denis Caromel 70

Not a P2P system

slide-71
SLIDE 71

Denis Caromel 71

Neither a P2P system

slide-72
SLIDE 72

Denis Caromel 72

P2P Examples (2)

slide-73
SLIDE 73

Denis Caromel 73

P2P Examples (2bis)

slide-74
SLIDE 74

Denis Caromel 74

A P2P system at work

Credit: from the movie Atlantis, Luc Besson

slide-75
SLIDE 75

Denis Caromel 75

Conclusion

  • GRIDs: - Scientific - Enterprise - Internet

Strong convergence in process (infrastructure): WS, WSRF

  • Challenge: adequate and precise programming+composing model
  • Asynchronous distributed objects, Mobility, Components
  • High-level of abstraction, still Open and flexible
  • Modern languages: Java, or others

not Fortran, MPI, C++, … not the answer

Perspectives:

  • Real P2P
  • Interactive, Graphical,

Deployment and Control:

Content

http://ProActive.ObjectWeb.org

slide-76
SLIDE 76

Denis Caromel 76

Interactive Composition in IC2D

Content Composition View Instead of XML ADL <processDefinition id=" <jvmProcess class="org.objectweb </processDefinition> <processDefinition id=” <sshProcess class="org.objectweb hostname <processReferen </sshProcess> </processDefinition>

slide-77
SLIDE 77

Denis Caromel 77

Merging Component + Activity / JVM Views: Component Monitoring

Content Dynamic View

slide-78
SLIDE 78

Denis Caromel 78

Content Dynamic View

Merging Component + Activity / JVM Views: Component Monitoring

slide-79
SLIDE 79

Denis Caromel 79

Conclusion (2)

Infrastructure and Deployment

  • Virtual Nodes and XML
  • Protocols: ssh, Globus, LSF, PBS, …
  • Transport: RMI, Ibis (Amsterdam)
  • Web Services: XML, WSDL, SOAP (ongoing)
  • OSGi (future work)

Available in LGPL with ProActive http://ProActive.ObjectWeb.org in The freedom your applications deserve!

Currently: a single application on 300 machines at once

Goal: towards a few 1000s !

slide-80
SLIDE 80

Denis Caromel 80

Next ProActive events

EuroPar 2004, Pisa, Italy, Monday 30th August, Full Day Tutorial

  • ProActive Tutorial, and
  • Hands-on session

User Group & Grid Interoperability, Nice, ETSI, Oct. 18-20

  • Detailed presentation of the platform
  • User presentations and feedbacks
  • Contest & PLUGTESTS : N queen challenge on GRID’5000, …
slide-81
SLIDE 81

Denis Caromel 81

slide-82
SLIDE 82

Denis Caromel 82

slide-83
SLIDE 83

Denis Caromel 83

slide-84
SLIDE 84

Denis Caromel 84

Exemple

50 Machines, 1,5 Année de Calcul 5000 Machines, Efficacité de 50 % ==> 10 Jours Applications:

  • Rechercher un vaccin
  • Prévoir la progression d’un incendie
  • Prévoir en temps réel les dangers d’une inondation ...
  • etc.

Enjeux: Passer à l’échelle

slide-85
SLIDE 85

Denis Caromel 85

Ubiquitaire: Quelques chiffres

PCs à l’INRIA Sophia : ~ 1500 PACA : 1,3 Millions France : 25 Millions Europe : 108 Millions USA : 400 Millions Monde : 1 Milliard en 2002 (25 ans) Prévision: 2 Milliards en 2008 France :

  • 36 Millions de téléphones portables
  • 2.2 Millions dordinateurs portables
  • 630 Mille PDA

(sources: ITU, Gartner Dataquest, IDC, 02-03, )

slide-86
SLIDE 86

Denis Caromel 86

Some code !

// CREATE THE COMPONENTS ComponentIdentity speakers = ProActive.newActiveComponent(speakers_parameters); // OR USE THE COMPONENTS LOADER // ComponentIdentity speakers = ComponentsLoader.getComponent(«speakers»); // BIND THE COMPONENTS ((BindingController)cd_player .getFcInterface(BindingController.BINDING_CONTROLLER)) .bindFc(« output», speakers.getFcInterface(«input»); // START THE LIFE CYCLE OF THE COMPONENTS (ENABLE THE COMPONENTS) ((LifeCycleController)speakers .getFcInterface(LifeCycleController.LIFECYCLE_CONTROLLER)) .startFc(); // INVOKE SOME ACTIONS ON FUNCTIONAL INTERFACES ((Input)speakers .getFcInterface(«input»)) .newMusic (music.mp3); ((PlayerFacade)cd_player .getFcInterface(«control»)) .play();

slide-87
SLIDE 87

Denis Caromel 87

  • 4. Composition, Deployment and

Runtime

slide-88
SLIDE 88

Denis Caromel 88 VirtualNodes // names of the virtual nodes VirtualNode name= «Node-facade» VirtualNode name =«Node-speaker» - cyclic Deployment // what is behind the names of the nodes mapping // correspondance between the names of the VNs and the JVMs Node-facade --> JVM1 Node-speaker --> {JVM2, JVM3, JVM4} // 1 VN can be mapped onto a set of JVMs JVMs JVM1 created by process «linuxJVM» JVM2 created by process «rsh-computer1» JVM3 created by process «rsh-computer2» JVM4 created by process «rsh-computer3» Infrastructure // how and where the JVMs specified above are created process-definition «linuxJVM» // this process creates a JVM on the current host JVMProcess class= JVMNodeProcess process-definition «rsh-computer1» // this process establishes an rsh connection and starts a JVM on the remote host rshProcess class = RSHProcess host = «computer1» processReference = «linuxJVM» process-definition «rsh-computer2» rshProcess class = RSHProcess host = «computer2» processReference = «linuxJVM process-definition «rsh-computer2» rshProcess class = RSHProcess host = «computer3» processReference = «linuxJVM»

slide-89
SLIDE 89

Denis Caromel 89

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, ProActive, ...

  • Level 4: Distributed + Reconfiguration
  • Binding, Inclusion, Location

ProActive + On going work Interactions / Communications: Functional Calls: service, event, stream Non-Functional: instantiate, deploy, start/stop, inner/outer, re-bind

This talk

slide-90
SLIDE 90

Denis Caromel 90

Distributed Components

Typed Group Java or Active Object ComponentIdentity Cpt = newActiveComponent (params); A a = Cpt … .getFcInterface ("interfaceName"); V v = a.foo(param); V A

Example of component instance

JVM

slide-91
SLIDE 91

Denis Caromel 91

Migration Capability

  • f composites

Migrate sets of components, including composites

slide-92
SLIDE 92

Denis Caromel 92

Collective Operations : Example

class 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 -> on vi.bar(); //a single call A a3=PA.newAct(A,); // => modif. of group ag : Group ga = ProActiveGroup. getGroup(ag); ga.add(a3); //ag is updated

slide-93
SLIDE 93

Denis Caromel 93

Two Representation Scheme

Group of objects

gA

Typed group

groupA getGroupByType static method of class ProActive getGroup method of class Group

Management

  • f the group

Fonctional use

  • f the group
slide-94
SLIDE 94

Denis Caromel 94

Two Representations (2)

  • Management operations add, remove, size, …
  • 2 possibility : static methods, second representation
  • 2 representations of a same group : Typed Group / Group of objects
  • ability to switch between those 2 representations

Group gA = ProActiveGroup.getGroup(groupA); gA.add(new A()); gA.add(new B()); //B herits from A A groupA = (A) gA.getGroupeByType();

slide-95
SLIDE 95

Denis Caromel 95

slide-96
SLIDE 96

Denis Caromel 96

ProActive : Migration 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 fullfilled)
slide-97
SLIDE 97

Denis Caromel 97

<virtualNodesDefinition> <virtualNode name="Dispatcher"/> </virtualNodesDefinition> <map virtualNode="Dispatcher"> <jvmSet> <vmName value="Jvm1"/> </jvmSet> </map> <jvm name="Jvm1"> <acquisition method="rmi"/> <creation> <processReference refid="linuxJVM"/> </creation> </jvm>

Definitions and mapping

Definition of Virtual Nodes Mapping of Virtual Nodes

Mapping Virtual Nodes: example (1)

slide-98
SLIDE 98

Denis Caromel 98

<virtualNodesDefinition> <virtualNode name="Jem3DNode"/> </virtualNodesDefinition> <map virtualNode=" Jem3DNode"> <jvmSet> <vmName value=”clusterJvm"/> </jvmSet> </map> <jvm name="clusterJvm"> <acquisition method="rmi"/> <creation> <processReference refid=”clusterProcess"/> </creation> </jvm>

Definitions and mapping

Definition of Virtual Nodes Mapping of Virtual Nodes

Mapping Virtual Nodes: example (2)

slide-99
SLIDE 99

Denis Caromel 99

Mapping Virtual Nodes: example (3)

<processDefinition id="linuxJVM"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id="rshProcess"> <rshProcess class="org.objectweb.proactive.core.process.rsh.RSHJVMProcess" hostname="sea.inria.fr"> <processReference refid="linuxJVM"/> </rshProcess> </processDefinition>

Infrastructure informations

JVM on the current Host JVM started using RSH

slide-100
SLIDE 100

Denis Caromel 100

<processDefinition id=”singleJVM"> <jvmProcess class="org.objectweb.proactive.core.process.JVMNodeProcess"/> </processDefinition> <processDefinition id=" clusterProcess "> <bsubProcess class="org.objectweb.proactive.core.process.lsf.LSFBSubProcess" hostname=”cluster.inria.fr"> <processReference refid=”singleJVM"/> <bsubOption> <processor>12</processor> </bsubOption> </bsubProcess> </processDefinition>

Mapping Virtual Nodes: example (4)

  • Definition of bsub

process

slide-101
SLIDE 101

Denis Caromel 101

Virtual Nodes in Programs (1)

Load the descriptor file Descriptor pad = ProActive.getDescriptor ("file://ProActiveDescriptor.xml"); Activate the mapping VirtualNode vn = pad.activateMapping ("Dispatcher"); // Triggers the JVMs Use nodes Node node = vn.getNode(); ... C3D c3d = ProActive.newActive("C3D", param, node);

slide-102
SLIDE 102

Denis Caromel 102

Descriptors: Virtual Nodes in Programs (2)

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() );

slide-103
SLIDE 103

Denis Caromel 103

Descriptors: Virtual Nodes in Programs (3)

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);

slide-104
SLIDE 104

Denis Caromel 104

Component Definition: XML ADL

Primitive-component "cd-player” implementation = "CdPlayer” // Java class with functional code Provides interface "input” … Requires … VirtualNode = VNa // Virtual Node name Composite-component ”stereo” VirtualNode = VNc, vn ... // Virtual Node Provides … Requires … Primitive-component ”cd-player” Primitive-component ”speaker” Bindings bind "cd-player.output" to "speaker.input" Merging VNa, VNb, ---> VNc // Co-allocation in that case Example of an XML component file:

slide-105
SLIDE 105

Denis Caromel 105

Descriptors: Mapping Virtual Nodes

Component Definitions: 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 Globus … 10 > rsh, … ssh, … Example of an XML file descriptor:

slide-106
SLIDE 106

Denis Caromel 106

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 Components are a way to globally manipulate distributed, and running activities

slide-107
SLIDE 107

Denis Caromel 107

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

slide-108
SLIDE 108

Denis Caromel 108

ProActive : Intra-object synchronization

Explicit 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 Active { live (ExplicitBody myBody) { while (...) { if (this.isFull()) myBody.serveOldest("get"); else if (this.isEmpty()) myBody.serveOldest ("put"); else myBody.serveOldest (); // Non-active wait myBody.waitARequest (); }}}

Implicit (declarative) control: library classes

e.g. : myBody.forbid ("put", "isFull");

slide-109
SLIDE 109

Denis Caromel 109

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

slide-110
SLIDE 110

Denis Caromel 110

ProActive : Reuse and seamless

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" a p_a foo (A a) { a.g (...); v = a.f (...); ... v.bar (...); }

slide-111
SLIDE 111

Denis Caromel 111

ProActive : Reuse and seamless

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 (“value to come”)

Ease the programming of synchronizations, and the reuse of routines

"A" "pA" a p_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

slide-112
SLIDE 112

Denis Caromel 112

ProActive : Intra-object synchronization

Explicit 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 Active { live (ExplicitBody myBody) { while (...) { if (this.isFull()) myBody.serveOldest("get"); else if (this.isEmpty()) myBody.serveOldest ("put"); else myBody.serveOldest (); // Non-active wait myBody.waitARequest (); }}}

Implicit (declarative) control: library classes

e.g. : myBody.forbid ("put", "isFull");

slide-113
SLIDE 113

Denis Caromel 113

SharedOnRead

Call between Objects

b.foo(x) b a x Copy

slide-114
SLIDE 114

Denis Caromel 114

Generalized Futures

… to done ...

b.foo(x) b a x Copy