Denis Caromel Institut universitaire de France (IUF) OASIS Team

75
Denis Caromel 1 Denis Caromel Institut universitaire de France (IUF) OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis JAOO, Cannes, May 2004 Programming, Composing, Deploying for the GRID 1. Grid principles 2. Distributed Objects and Components: ObjectWeb ProActive LGPL environment 3. Application: 3D Electromagnetism 4. Towards Peer-To-Peer (P2P)

description

Programming, Composing, Deploying for the GRID. Denis Caromel Institut universitaire de France (IUF) OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis JAOO, Cannes, May 2004. 1. Grid principles 2. Distributed Objects and Components: ObjectWeb ProActive LGPL environment - PowerPoint PPT Presentation

Transcript of Denis Caromel Institut universitaire de France (IUF) OASIS Team

Page 1: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 1

Denis CaromelInstitut universitaire de France (IUF)

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

JAOO, Cannes, May 2004

Programming, Composing, Deployingfor the GRID

1. Grid principles2. Distributed Objects and Components:

ObjectWeb ProActive LGPL environment3. Application: 3D Electromagnetism4. Towards Peer-To-Peer (P2P)

Page 2: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 2

The GRIDPCs : 1 Milliard in 2002 (25 years) Forecast: 2 Milliards in 2008

Page 3: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 3

The Grid idea

GRID = Electric Network

Computer Power (CPU cycles) <==> Electricity • Can hardly be stored, if not used --> Lost

But CPU cycles much harder to share than electricity:• Production cannot be adjusted!• Cannot really be delivered where needed! • Not yet interoperability: Multiple Administrative Domains

2 important aspects : Computational + Data Grid

Global management, Mutual sharing of the resource

Page 4: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 4

Example

50 Machines, 1.5 year of computation

5000 Machines, with only 50 % Efficiency==> 10 days

Applications:• Simulate the stock market evolution• Research for an urgent vaccine • Forecast a bush-fire path• Forecast in real time a flooding consequences ...

• etc.

Challenge: Scale up

Page 5: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 5

Ubiquitous: some numbers

PCs in my lab (INRIA Sophia) : ~ 1500 French Riviera : 1.3 Millions

France : 25 Millions Europe : 108 Millions USA : 400 Millions

World : 1 Milliard in 2002 (25 ans) Forecast: 2 Milliards in 2008

France :

• 36 Millions of cellular phones

• 2.2 Millions of laptops

• 630 Thousand PDA

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

Page 6: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 6

The multiple GRIDs

Scientific Grids :• Parallel machines, Clusters

• Large equipments: Telescopes, Particle accelerators, etc.

Enterprise Grids :• Data, Integration: Web Services

• Remote connection, Security

Intranet and Internet Grids, (miscalled P2P grid):• Desktop office PCs: Desktop Intranet Grid

• Home PC: Internet Grid (e.g. SETI@HOME)

Page 7: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 7

Enterprise Grids

Internet

EJBServletsApache Databases

Page 8: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 8

Scientific Grids

Internet

Clusters

ParallelMachine

LargeEquipment

Page 9: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 9

Internet Grids

Internet

Job management forembarrassingly parallel application (e.g. SETI)

Page 10: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 10

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 11: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 11

Grid: from enterprise ... to regional

Very hard deployment problems … right from the beginning

Page 12: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 12

Grid: from regional ... to worldwide Communication Cannes-Los Angeles: 70 ms Light Speed

Challenge: Hide the latency !

Define adequate programming model

Page 13: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 13

Distributed Objects and Components

ProActiveProgramming

Page 14: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 14

Model:• Remote Objects (Active Objects vs. Java RMI)• Asynchronous Communications, with automatic Futures • Group Communications, Migration (computation mobility)Environment:• XML Deployment, dynamic class-loading• 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 15: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 15

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

Page 16: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 16

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 17: Denis Caromel Institut universitaire de France (IUF) OASIS Team

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: Denis Caromel Institut universitaire de France (IUF) OASIS Team

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)

direct

Page 19: Denis Caromel Institut universitaire de France (IUF) OASIS Team

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

direct

Page 20: Denis Caromel Institut universitaire de France (IUF) OASIS Team

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

forwarder

Page 21: Denis Caromel Institut universitaire de France (IUF) OASIS Team

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: Denis Caromel Institut universitaire de France (IUF) OASIS Team

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: Denis Caromel Institut universitaire de France (IUF) OASIS Team

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: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 24

Parallel, Distributed, Hierarchical

Componentsfor the Grid

Composing

Page 25: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 25

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 26: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 26

Building CCM Applications =Assembling CORBA Component Instances

Provide + Use, but flat assembly

Page 27: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 27

Content

Controller

The Fractal model:Hierarchical Component

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

Page 28: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 28

Content

Controller

Interface = access point

Page 29: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 29

Content

Controller

Hierarchical model : composites encapsulate primitives, which encapsulates Java code

Page 30: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 30

Content

Controller

Binding = interaction

Page 31: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 31

Binding = interaction

Content

Controller

Page 32: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 32

Controllers : non-functional properties

ComponentIdentity

BindingController

LifeCycleController

ContentController

Content

Controller

Component = runtime entity

Page 33: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 33

3. Parallel and composite component

1. Primitive component Java + Legacy

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 34: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 34

Composing: 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 35: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 35

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 36: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 36

Migration Capabilityof composites

Migrate sets of components, including composites

Page 37: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 37

Migration Capabilityof composites

Migrate sets of components, including composites

Page 38: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 38

Co-allocation, Re-distribution

e.g. upon communication intensive phase

Page 39: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 39

Co-allocation, Re-distribution

e.g. upon communication intensive phase

Page 40: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 40

Co-allocation, Re-distribution

e.g. upon communication intensive phase

Page 41: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 41

EnvironmentDeploying

Page 42: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 42

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 43: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 43

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 44: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 44

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 45: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 45

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

Infrastructureinformations

Definition of LSF deployment, … Globus

Page 46: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 46

C A B

VNa VNb

C A B

VNc = VN(a,b)

XML Deployment (Not in source)

Separate or Co-allocation

Page 47: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 47

IC2D: Interactive Control and Debugging of Distribution

Page 48: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 48

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

ProActive IC2D:

Width of links

proportional

to the number

of com-

munications

Page 49: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 49

Application

Page 50: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 50

A Parallel Object-Oriented Application for 3D Electromagnetism

Visualize the radar reflection of a plane, medicine on head, etc.• Pre-existing Fortran MPI version: EM3D

Jem3D:• Sequential object-oriented design, modular and extensible (in Java)

• Sequential version can be smoothly distributed:

--> keeping structuring and object abstractions

• Efficient distributed version, large domains, Grid environment

Page 51: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 51

The interface

Page 52: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 52

Some ResultsSeq. 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 53: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 53

Perspective:

P2P

Page 54: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 54

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

Internet

EJBServletsApache Databases

SOA: Service Oriented Architectures

Page 55: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 55

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 56: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 56

P2P Examples (1)

Page 57: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 57

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

Page 58: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 58

Not a P2P system

Page 59: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 59

Neither a P2P system

Page 60: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 60

P2P Examples (2)

Page 61: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 61

P2P Examples (2bis)

Page 62: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 62

A P2P system at work

Credit: from the movie Atlantis, Luc Besson

Page 63: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 63

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 64: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 64

Interactive Composition in IC2D

Content

Composition ViewInstead of

XML ADL

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

Page 65: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 65

Merging Component + Activity / JVM Views:Component Monitoring

Content

Dynamic View

Page 66: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 66

Content

Dynamic View

Merging Component + Activity / JVM Views:Component Monitoring

Page 67: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 67

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 machinesGoal: towards a few 1000s !

Page 68: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 68

Page 69: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 69

Page 70: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 70

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 71: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 71

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 72: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 72

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 73: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 73

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 74: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 74

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 75: Denis Caromel Institut universitaire de France (IUF) OASIS Team

Denis Caromel 75

C3D: distributed-//-collaborative