Title: ObjectOriented SPMD
1Object-Oriented SPMD
Laurent Baduel, Denis Caromel, Françoise Baude
2Context Objectives
- Traditional use of group communication
- Fault tolerance, replication, database
- Applicative groups, parallelism
- Our objectives
- Collaborative applications
- More efficient communication
- Simplicity and easy structuring
- Object-oriented programming
3Communication model
- Java RMI new important features
- Sequential Object
- a single thread with FIFO service
- Asynchronous method call
- rendez-vous
- Futures
- Wait-by-Necessity
- Automatic wait upon a strict operation on a
future - First class futures
- Futures can be passed to other activities
- Sending a future to another machines is not
blocking
4Active Object
A ag PA.newActive (A, , VirtualNode) V v1
ag.foo (param) V v2 ag.bar
(param) ... v1.gee() //Wait-By-Necessity
Wait-By-Necessity is a Dataflow Synchronization
JVM
ag
Req. Queue
Java Object
Active Object
Future Object
Thread
5Typed group communication
- Idea / Goals
- Manipulate groups as plain Java objects
- Maintain the dot notation
- Code reusability
- Creation of typed group
- Group members have a common type ancestor
public class A A gA ProActive.newGroup(A
, params, nodes)
6Group communication
- Remote method invocation on a group
- Multi-unicast approach
- Based on the ProActive communication mechanism
- Replication of N single communication
- Each communication is adapted
- Preserve the rendez-vous
7Group the result of aGroup Communication
- Result are dynamically built and updated
- B groupB groupA.foo()
- Ranking order property
- Synchronization primitive
- ProActive.waitOne(gb)
- ProActive.waitAll(gb)
8Construction of a result group
B groupB groupA.foo()
A
Java object
Java object
9Two representations
- Management operations add, remove,
- 2 representations (views) of a same group
- Typed group
- Group of object
- Ability to switch between those 2 views
Group groupA ProActive.getGroup(gA) groupA.add(
new A()) groupA.add(new B()) // B herits from
A A gA2 (A) groupA.getGroupByType()
10Broadcast or scatter
- Broadcast is the default behavior
- Scatter is also possible
- use a group as parameter
- Scattered depends on rankings
- gA.bar(gC) // broadcast gC
- ProActive.setScatterGroup(gC)
- ga.bar(gC) // scatter gC
- One call may scatter and broadcast
11Features of groups
- Optimization
- Parallel calls within a group (adaptive
threadpool) - Treatment in the result return order
- Single serialization
- Flexibility Active group
- A group becomes remotely accessible
- Modifiable service policy
12Main MPI problems for the GRID
- Too static in design
- Too complex in Interface (API)
- Too many specific primitives to be adaptive
- Type Less
13Object-Oriented SPMD
- Motivation
- Cluster / GRID computing
- SPMD programming notoriety
- Able to express most of MPIs collective
communications - broadcast
- scatter
- gather
- Different barriers
- reduce
- allscatter
- allgather
14SPMD group
- Creation
- A ag ProActive.newSPMDGroup(A,...)
15Topologies
- Topologies are typed groups
- Open API
- Neighborhood
- Creation by extraction
Plan plan new Plan(groupA, Dimensions) Line
line plan.getLine(0)
16The Jacobi Iteration example
- Solve a linear system of equations
- Typical SPMD program
- Algorithm loop on
- exchange data
- wait for the data
- compute
- loop (until exit condition is satisfied)
17Global barrier
- Involves all group member
- ProActive.barrier(barrierID)
18Neighbor-based barrier
- Involves only the caller and it neighbors
- ProActive.barrier(barrierID,neighbors)
19Method-based Barrier
- Involves only the caller
- no additional messages
- ProActive.barrier(foo,bar,gee)
20ProActive OO SPMD
- A simple communication model
- Small API
- No Receive but data flow synchronization
- No message passing but RPC
- Complex data structure (Object)
- SPMD groups are dynamic
- Efficient and dedicated barrier
21? ? ? Questions ? ? ?
22(No Transcript)
23Two representations
Management of the group
Functional use of the group
24Group communication is now a key feature of
ProActive
- Used in many applications and other features
Chat
Jem3D
Peer to peer
Multiport component
25Common operation factorization
26Thread pool
27Hierarchical groups
- Group contains groups
- Add a typed group into a group
- Benefit of the network structure
A
28(No Transcript)