1 / 48

Typed Groups for the Grid

Typed Groups for the Grid. Laurent Baduel. Outline. Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and usage Conclusion and Perspectives. Introduction. Traditional uses of group communication Fault tolerance, Replication

sibley
Download Presentation

Typed Groups for the Grid

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Typed Groupsfor the Grid Laurent Baduel

  2. Outline • Context and Objectives • Typed groups • Application: Jem3D • Object-Oriented SPMD • Group extensions and usage • Conclusion and Perspectives

  3. Introduction • Traditional uses of group communication • Fault tolerance, Replication • Applicative groups, Parallelism • Our objectives: Applicative groups • Efficient communication • Collaborative applications • Easy structuring • Object-oriented programming

  4. Analysis of related works • 3 projects close to our concerns: • JGroups • Centered on low layers of communication • Socket programming style • Object Group Service • CORBA focused • Group communication return only one result (by default) • Group Method Invocation • Group members have to implement and extend a class and an interface

  5. Analysis of related works • Lack of transparency • Specific interface for functional calls • Inheritance from specific classes and interfaces • Sometimes too application/domain-specific We want to address those problems !

  6. Communication model • RMI + important new features • Active object: • A single thread serves requests with a FIFO service • Asynchronous method call • Rendez-vous • Transparent futures • Wait-by-necessity • Automatic wait upon a strict operation on a future • First class futures

  7. a v2 v1 JVM JVM bar foo Active object A a = PA.newActive(“A”,[…],VirtualNode); V v1 = a.foo (param); V v2 = a.bar (param); … v1.gee(); // Wait-By-Necessity Active object Request queue Java object Future Thread

  8. Context and Objectives • Typed groups • Application: Jem3D • Object-Oriented SPMD • Group extensions and usage • Conclusion and Perspectives

  9. Typed group communications • Idea / goal • Manipulate groups as “plain” Java objects • Maintain the dot notation • Code reusability • Creation of a typed group • Group members have a common type ancestor public class A { … } A ag = (A)ProActiveG.newGroup(“A”,params,node);

  10. Group communications • Remote method invocation on a group • Multi-unicast approach • Replication of N single communications • Based on the standard communication mechanism • Each communication is adapted to the callee • Adapt the rendez-vous to group communications • Adapt the Wait-by-Necessity mechanism

  11. Result of a group communication • Result is dynamically built and updated V vg = ag.foo(); • Immediately operable vg.gee(); • Rank property • Synchronization primitive ProActiveGroup.waitOne(vg); ProActiveGroup.waitAll(vg); Object o = ProActiveGroup.waitAndGetOne(vg);

  12. ag vg JVM JVM JVM JVM Group call A ag = PAG.newGroup(“A”,…,vn); V vg = ag.foo(param); … vg.gee(); … //Wait-By-Necessity

  13. Two representations • Management operations: add, remove, etc. • Two representations of a same group • Typed group (type of the members) • Group of objects (extends Collection) • Ability to switch between them Group groupA = ProActive.getGroup(ag); groupA.add(new A()); groupA.add(new B()); // B extends A A ag2 = (A) groupA.getTypedGroup();

  14. Typed group gA Group of objects groupA Two representations schema getTypedGroup method of classGroup Single Java Representation getGroup static method of classProActive Functional use of the group Managementof the group (Explicit) (Transparent)

  15. Broadcast or scatter • Broadcast is the default behavior • Scatter is also possible • Scatter uses a group as parameter • Distribution relies on rank ag.bar(cg); // broadcast cg ProActive.setScatterGroup(cg); ag.bar(cg); // scatter cg • One call may scatter and broadcast

  16. ag JVM c3 c3 c3 c3 c3 c3 c3 c1 c1 c1 c1 c1 c1 c1 c2 c2 c2 c2 c2 c2 c2 JVM JVM s s JVM Broadcast or scatter cg ag.bar(cg); // broadcast cg ProActive.setScatterGroup(cg); ag.bar(cg); // scatter cg

  17. c4 c4 c4 c6 c6 c6 c5 c5 c5 c7 c7 c7 c8 c8 c8 c0 c0 c0 c9 c9 c9 empty queue c3 c3 c3 c1 c1 c1 c2 c2 c2 JVM Static Dispatch Group Slowest ag cg JVM Fastest JVM JVM ag.bar(cg);

  18. c4 c4 c4 c6 c6 c6 c5 c5 c5 c7 c7 c7 c8 c8 c8 c0 c0 c0 c9 c9 c9 c3 c3 c3 c1 c1 c1 c2 c2 c2 JVM Dynamic Dispatch Group Slowest ag cg JVM Fastest JVM JVM ag.bar(cg);

  19. Performances and Optimizations • Common operation • Single reification • Single serialization • Parallel calls (adaptive thread pool)

  20. Error management • Using Java exceptions • Common way to express failure in Java • A group may produce several exceptions during one communication • Result group is used to store exceptions • The ExceptionList is an exception that contains raised exceptions associated with a reference to the object that produced them

  21. Except. List ag vg JVM JVM JVM Except. failure JVM Error interception V vg = ag.foo (param); Group groupV = PAG.getGroup(vg); groupV.getExceptionList(); vg.gee();

  22. Active and hierarchical groups • Active group: a group service • A group becomes remotely accessible • Modifiable service policy • Hierarchical group • A group of groups • Dynamically built • Achieves scalability

  23. grid frontal cluster cluster cluster cluster Grid deployment Asynchronous call Synchronous call

  24. Grid method calls Grid’5000

  25. Context and Objectives • Typed groups • Application: Jem3D • Object-Oriented SPMD • Group extensions and usage • Conclusion and Perspectives

  26. Jem3D • Translation of a FORTRAN application: EM3D • Solves 3D Maxwell equations • Relies on finite volume approximation method • Works on unstructured tetrahedral discretization of the computation domain

  27. Communication based on groups • Groups allow sub-domains communication

  28. Intensive group communications Algorithm of Jem3D Initialization Compute mag. field, and update elec. field Compute elec. field, and update mag. field Calculation of the discrete electromagnetic energy t < tmax t = tmax Solution Saving

  29. INRIA Sophia’s cluster DAS-2 Jem3D • Computation of the propagation of an electromagnetic wave in a cubic metallic cavity (standard test case)

  30. Context and Objectives • Typed groups • Application: Jem3D • Object-Oriented SPMD • Group extensions and usage • Conclusion and Perspectives

  31. Main MPI problems for the Grid • Too static in design • Too complex interface (API) • More than 200 primitives and 80 constants • Too many specific primitives to be adaptive • Send, Bsend, Rsend, Ssend, Ibsend, etc. • Typeless (message passing) • Manual management of complex data structures

  32. Object-Oriented SPMD (Single Program Multiple Data) • Motivation • Cluster / Grid programming • SPMD programming widely used • Already able to express most of the MPI’s collective communications • Broadcast • Scatter • Different barriers • Topologies • All scatter • All gather • Gather • Reduce

  33. JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM SPMD group • Creation A ag = ProActive.newSPMDGroup(“A”,…);

  34. SPMD Group • SPMD Group is a typed group where members get: • Local reference to the SPMD group they belongs to • Membership • Access to their rank

  35. Topologies • Topologies are groups of objects Plan plan = new Plan(groupSPMD, dimensions); • Open API • Neighborhood • Creation by extraction Line line = plan.getLine(0);

  36. The Jacobi iterations example • Solve a linear system of equations • Typical SPMD program • Algorithm loops on: • Exchange data • Wait for data • Compute • Loop (until exit condition is satisfied)

  37. 2 5 7 9 1 0 1 0 5 6 7 8 … … JVM JVM JVM JVM JVM JVM JVM JVM JVM Jacobi algorithm

  38. JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM Global barrier • Involves all group members ProActive.barrier(“barrierID”);

  39. JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM Neighbor-based barrier • Involves only the caller and its neighbors ProActive.barrier(“barrierID”,neighbors);

  40. JVM JVM JVM JVM JVM JVM JVM JVM JVM JVM Method-based barrier • Involves only the caller (no additional messages) ProActive.barrier({“foo”,“bar”,“gee”});

  41. OO SPMD model • A simple communication model • Small API • No explicit receive: data flow synchronization • No message passing: asynchronous RPC • Complex data structures (Objects) • SPMD groups are dynamic • Dedicated barriers • Topologies

  42. Context and Objectives • Typed groups • Application: Jem3D • Object-Oriented SPMD • Group extensions and usage • Conclusion and Perspectives

  43. Group behavior manager In collaboration with University of Sannio – Benevento (Italy) • Definition of a group behavior • Request mapping • Parameters distribution • Results gathering • Synchronization semantic • Dynamic configuration and binding • IP Multicast library • Bindings to multicast transport protocol • TRAM, included in JRMS 1.1

  44. Typed group Typed group Groups in the component framework • Implementation of the Fractal component model • Collective ports • Composite components At composition, on composite inner server interface At binding, on client interface Parallel Component

  45. Context and Objectives • Typed groups • Application: Jem3D • Object-Oriented SPMD • Group extensions and usage • Conclusion and Perspectives

  46. Conclusion • High level, Efficient, Transparent, Typed Group Communication • No dedicated inheritance requirement • Dynamic handling of results • High level synchronization • Tested with a real size application • Object-Oriented model for SPMD Programming • More flexible • Easier to use

  47. Perspectives • Exception handling • Improvement of the adaptive thread pool • Integrate other group semantics • MxN redistribution for components • Further development of the OO SPMD model

  48. Thank you for your attention ? ? ? Questions ? ? ?

More Related