Grille: la plate-forme ObjectWeb ProActive
Transcript of Grille: la plate-forme ObjectWeb ProActive
![Page 1: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/1.jpg)
Denis Caromel 1
Denis CaromelInstitut Universitaire de France (IUF)
OASIS TeamINRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis
GridUse, june 2004
Grille:la plate-forme ObjectWeb ProActive
1. LES GrilleS2. Objets Répartis et Asynchrones3. Composants répartis, parallèles et hiérarchiques4. Déploiement, Environnements interactifs5. Exemples d’applications ProActive6. Vrais Systèmes P2P en action
![Page 2: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/2.jpg)
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, ...
![Page 3: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/3.jpg)
Denis Caromel 3
![Page 4: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/4.jpg)
Denis Caromel 4
Enterprise Grids
Internet
EJBServletsApache Databases
![Page 5: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/5.jpg)
Denis Caromel 5
Scientific Grids
Internet
Clusters
ParallelMachine
LargeEquipment
![Page 6: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/6.jpg)
Denis Caromel 6
Internet Grids
Internet
Job management forembarrassingly parallel application (e.g. SETI)
![Page 7: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/7.jpg)
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
![Page 8: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/8.jpg)
Denis Caromel 8
Grid: from enterprise ... to regionalVery hard deployment problems … right from the beginning
![Page 9: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/9.jpg)
Denis Caromel 9
Grid: from regional ... to worldwideCommunication Supélec-Los Angeles: 70 ms Light Speed
Challenge: Hide the latency !
Define adequate programming model
![Page 10: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/10.jpg)
Denis Caromel 10
Distributed Objects andComponents
ProActiveProgramming
![Page 11: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/11.jpg)
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 GRIDParallel, Distributed, Mobile, Activities, across the world !
SMP ClustersLANDesktop
![Page 12: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/12.jpg)
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
![Page 13: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/13.jpg)
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
![Page 14: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/14.jpg)
Denis Caromel 14
Seamless Reuse / Granularity ControlTwo 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 (...);}
![Page 15: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/15.jpg)
Denis Caromel 15
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 16: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/16.jpg)
Denis Caromel 16
Standard system at Runtime
![Page 17: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/17.jpg)
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)
![Page 18: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/18.jpg)
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)
![Page 19: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/19.jpg)
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
![Page 20: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/20.jpg)
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
![Page 21: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/21.jpg)
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
![Page 22: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/22.jpg)
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
![Page 23: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/23.jpg)
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
![Page 24: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/24.jpg)
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
![Page 25: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/25.jpg)
Denis Caromel 25
Parallel, Distributed, Hierarchical
for the Grid
Composing
![Page 26: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/26.jpg)
Denis Caromel 26
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 27: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/27.jpg)
Denis Caromel 27
Building CCM Applications =Assembling CORBA Component Instances
Provide + Use, but flat assembly
![Page 28: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/28.jpg)
Denis Caromel 28
Content
Controller
The Fractal model:Hierarchical Component
Defined by E. Bruneton, T. Coupaye, J.B. Stefani, INRIA & FT
![Page 29: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/29.jpg)
Denis Caromel 29
Content
Controller
Interface = access point
![Page 30: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/30.jpg)
Denis Caromel 30
Content
Controller
Hierarchical model : composites encapsulate primitives encapsulate Java code
![Page 31: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/31.jpg)
Denis Caromel 31
Content
Controller
Binding = interaction
![Page 32: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/32.jpg)
Denis Caromel 32
Binding = interaction
Content
Controller
![Page 33: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/33.jpg)
Denis Caromel 33
Controllers : non-functional properties
ComponentIdentity
BindingController
LifeCycleController
ContentController
Content
Controller
Component = runtime entity
![Page 34: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/34.jpg)
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)
![Page 35: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/35.jpg)
Denis Caromel 35
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 + 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
![Page 36: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/36.jpg)
Denis Caromel 36
A
A
B
C
P
Group proxyGroup proxy
A
B
C
D
Groups in Components
Broadcast at binding,
on client interface
At composition,
on composite inner server interface
A parallel component!
![Page 37: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/37.jpg)
Denis Caromel 37
Migration Capabilityof composites
Migrate sets of components, including composites
![Page 38: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/38.jpg)
Denis Caromel 38
Migration Capabilityof composites
Migrate sets of components, including composites
![Page 39: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/39.jpg)
Denis Caromel 39
Co-allocation, Re-distribution
e.g. upon communication intensive phase
![Page 40: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/40.jpg)
Denis Caromel 40
Co-allocation, Re-distribution
e.g. upon communication intensive phase
![Page 41: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/41.jpg)
Denis Caromel 41
Co-allocation, Re-distribution
e.g. upon communication intensive phase
![Page 42: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/42.jpg)
Denis Caromel 42
Deploying
![Page 43: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/43.jpg)
Denis Caromel 43
How to deploy on the Various Kind of Grids ?
Internet
EJBServletsApache Databases
Internet
ClustersParallelMachine
LargeEquipment
Internet
Job management forembarrassingly parallel application (e.g. SETI)
![Page 44: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/44.jpg)
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, ...
![Page 45: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/45.jpg)
Denis Caromel 45
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 46: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/46.jpg)
Denis Caromel 46
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 >
...
Example of
an XML file
descriptor:
![Page 47: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/47.jpg)
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
![Page 48: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/48.jpg)
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)
,QIUDVWUXFWXUHLQIRUPDWLRQV
Definition of LSF deployment, … Globus
![Page 49: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/49.jpg)
Denis Caromel 49
C A B
VNa VNb
C A B
VNc = VN(a,b)
XML Deployment (Not in source)
Separate or Co-allocation
![Page 50: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/50.jpg)
Denis Caromel 50
IC2D: Interactive Control and Debugging of Distribution
With any ProActive applicationFeatures:
Graphical and Textual visualization Monitoring and Control
![Page 51: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/51.jpg)
Denis Caromel 51
Monitoring of RMI, Globus, Jini, LSF clusterNice -- Baltimore
ProActive IC2D:
Width of links
proportional
to the number
of com-
munications
![Page 52: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/52.jpg)
Denis Caromel 52
JobMonitoring
![Page 53: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/53.jpg)
Denis Caromel 53
![Page 54: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/54.jpg)
Denis Caromel 54
C3D: distributed-//-collaborative
Collaborative 3D,Rendering in //,
Applicationmobility
![Page 55: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/55.jpg)
Denis Caromel 55
Jem3D
![Page 56: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/56.jpg)
Denis Caromel 56
JEM 3D : Java 3D Electromagnetismtogether 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)
0
100
200
300
400
500
600
700
800
900
0 10 20 30 40 50 60 70nombre de processeurs
tem
ps
(sec
on
des
)
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
![Page 57: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/57.jpg)
Denis Caromel 57
Recent BenchmarksSeq. 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
![Page 58: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/58.jpg)
Denis Caromel 58
Monte Carlo Simulations,Non-Linear Physics, INLN
![Page 59: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/59.jpg)
Denis Caromel 59
Electric Network Planning,E. Zimeo et al., Benevento (Naples), Italy
On-line Power Systems Security Analysis (OPSSA)
![Page 60: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/60.jpg)
Denis Caromel 60
Electric Network Planning,E. Zimeo et al., Benevento (Naples), Italy
On-line Power Systems Security Analysis (OPSSA)
![Page 61: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/61.jpg)
Denis Caromel 61
Electric Network Planning,E. Zimeo et al., Benevento (Naples), Italy
On-line Power Systems Security Analysis (OPSSA)
![Page 62: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/62.jpg)
Denis Caromel 62
Electric Network Planning,E. Zimeo et al., Benevento (Naples), Italy
On-line Power Systems Security Analysis (OPSSA)
![Page 63: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/63.jpg)
Denis Caromel 63
Electric Network Planning,E. Zimeo et al., Benevento (Naples), Italy
On-line Power Systems Security Analysis (OPSSA)
![Page 64: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/64.jpg)
Denis Caromel 64
P2P N Queens
![Page 65: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/65.jpg)
Denis Caromel 65
Real
![Page 66: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/66.jpg)
Denis Caromel 66
Architectures: Server to Peer-To-Peer (P2P)
Internet
EJBServletsApache Databases
SOA: Service Oriented Architectures
![Page 67: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/67.jpg)
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
![Page 68: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/68.jpg)
Denis Caromel 68
P2P Examples (1)
![Page 69: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/69.jpg)
Denis Caromel 69
P2P can be difficult:need to be fault-tolerant, self healing
![Page 70: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/70.jpg)
Denis Caromel 70
Not a P2P system
![Page 71: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/71.jpg)
Denis Caromel 71
Neither a P2P system
![Page 72: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/72.jpg)
Denis Caromel 72
P2P Examples (2)
![Page 73: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/73.jpg)
Denis Caromel 73
P2P Examples (2bis)
![Page 74: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/74.jpg)
Denis Caromel 74
A P2P system at work
Credit: from the movie Atlantis, Luc Besson
![Page 75: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/75.jpg)
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
![Page 76: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/76.jpg)
Denis Caromel 76
Interactive Composition in IC2D
Content
Composition ViewInstead of
XML ADL
<processDefinition id="
<jvmProcessclass="org.objectweb
</processDefinition>
<processDefinition id=”
<sshProcessclass="org.objectweb
hostname="sea.
<processReference refid
</sshProcess>
</processDefinition>
![Page 77: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/77.jpg)
Denis Caromel 77
Merging Component + Activity / JVM Views:Component Monitoring
Content
Dynamic View
![Page 78: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/78.jpg)
Denis Caromel 78
Content
Dynamic View
Merging Component + Activity / JVM Views:Component Monitoring
![Page 79: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/79.jpg)
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 ProActivehttp://ProActive.ObjectWeb.org in
The freedom your applications deserve!
Currently: a single application on 300 machines at onceGoal: towards a few 1000s !
![Page 80: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/80.jpg)
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, …
![Page 81: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/81.jpg)
Denis Caromel 81
![Page 82: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/82.jpg)
Denis Caromel 82
![Page 83: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/83.jpg)
Denis Caromel 83
![Page 84: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/84.jpg)
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
![Page 85: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/85.jpg)
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, )
![Page 86: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/86.jpg)
Denis Caromel 86
Some code !// CREATE THE COMPONENTSComponentIdentity 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();
![Page 87: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/87.jpg)
Denis Caromel 87
4. Composition, Deployment andRuntime
![Page 88: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/88.jpg)
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 JVMsNode-facade --> JVM1Node-speaker --> {JVM2, JVM3, JVM4} // 1 VN can be mapped onto a set of JVMs
JVMsJVM1 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= JVMNodeProcessprocess-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 »
![Page 89: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/89.jpg)
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, streamNon-Functional: instantiate, deploy, start/stop, inner/outer, re-bind
This talk
![Page 90: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/90.jpg)
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
![Page 91: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/91.jpg)
Denis Caromel 91
Migration Capabilityof composites
Migrate sets of components, including composites
![Page 92: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/92.jpg)
Denis Caromel 92
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() oneach member ofthe result groupupon 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. ofgroup ag :
Group ga =ProActiveGroup.getGroup(ag);
ga.add(a3);
//ag is updated
![Page 93: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/93.jpg)
Denis Caromel 93
Two Representation Scheme
Group of objectsgA
Typed groupgroupA
getGroupByTypestatic method of class ProActive
getGroupmethod of class Group
Management
of the group
Fonctional use
of the group
![Page 94: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/94.jpg)
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();
![Page 95: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/95.jpg)
Denis Caromel 95
![Page 96: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/96.jpg)
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)
![Page 97: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/97.jpg)
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 ofVirtual Nodes
Mapping ofVirtual Nodes
Mapping Virtual Nodes: example (1)
![Page 98: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/98.jpg)
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 ofVirtual Nodes
Mapping ofVirtual Nodes
Mapping Virtual Nodes: example (2)
![Page 99: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/99.jpg)
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
![Page 100: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/100.jpg)
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)
,QIUDVWUXFWXUHLQIRUPDWLRQV
Definition of bsubprocess
![Page 101: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/101.jpg)
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);
![Page 102: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/102.jpg)
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() );
![Page 103: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/103.jpg)
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);
![Page 104: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/104.jpg)
Denis Caromel 104
Component Definition: XML ADLPrimitive-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:
![Page 105: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/105.jpg)
Denis Caromel 105
Descriptors: Mapping Virtual NodesComponent 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:
![Page 106: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/106.jpg)
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 manipulatedistributed, and running activities
![Page 107: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/107.jpg)
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 factoryTo 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 108: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/108.jpg)
Denis Caromel 108
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 FixedBufferimplements 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 classese.g. : myBody.forbid ("put", "isFull");
![Page 109: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/109.jpg)
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 factoryTo 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 110: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/110.jpg)
Denis Caromel 110
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
Ease the programming of synchronizations, and the reuse of routines
"A"
"pA"
ap_a
foo (A a){ a.g (...); v = a.f (...); ... v.bar (...);}
![Page 111: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/111.jpg)
Denis Caromel 111
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 112: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/112.jpg)
Denis Caromel 112
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 FixedBufferimplements 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 classese.g. : myBody.forbid ("put", "isFull");
![Page 113: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/113.jpg)
Denis Caromel 113
SharedOnReadCall between Objects
b.foo(x)ba
x
Copy
![Page 114: Grille: la plate-forme ObjectWeb ProActive](https://reader035.fdocuments.in/reader035/viewer/2022062523/62b418dff2e93605e22d1430/html5/thumbnails/114.jpg)
Denis Caromel 114
Generalized Futures… to done ...
b.foo(x)ba
x
Copy