170 likes | 268 Views
The Jgroup Project Alberto Montresor Ozalp Babaoglu University of Bologna - Italy Department of Computer Science. Introduction. What is Jgroup? A group communication toolkit developed at the University of Bologna Main characteristics: Partition-aware group membership Written in Java
E N D
The Jgroup Project Alberto MontresorOzalp Babaoglu University of Bologna - ItalyDepartment of Computer Science
Introduction • What is Jgroup? • A group communication toolkit developed at the University of Bologna • Main characteristics: • Partition-aware group membership • Written in Java • Tightly integrated with Java RMI • Partially integrated with Jini • Can be integrated with J2EE! • Please note: • Still a prototype: never reached the stability of other toolkits
Brief History • 1997-1999 • Specification and implementation of the main Jgroup core Group Membership, View Synchrony, Merging Support • 2000 • Integration with Java RMI started • First contacts with Sun RMI group • 2001-2002 • Collaboration with Sun on a new RMI API and framework • (Partially) integrated in JDK 1.4 • Downloadble as separate module(Jeri project in Jini)
The Object Group Paradigm • Object group: • A dynamic collection of server objects that cooperate in order to deliver some service and maintain shared state • Group method invocations: • Refer to the act of invoking a method on an object group • The method is executed by a certain number of servers in the object group, depending on the invocation semantics ObjectGroup Client Server Server Server
Group Method Invocation (GMI) • Internal GMI • For “closed” communication among members of a group • Two types: • Synchronous: return value is an array • Asynchronous: returns void; values returned through callback • External GMI • For “open” communication originated from external clients • Two types: • Anycast: one member executes the invocation; useful for read operations • Multicast: all members execute the invocation; useful for write operations
Synchronous Internal Invocations int[] values = group.getValue(); intgetValue() { // return value } Synchronous invocation S1 S2 S3
Asynchronous Internal Invocations ValuesCB cb = new ValuesCB(); group.getValue(cb); public classValuesCBimplements Callback {void results(Object value){...} }\ intgetValue() { // return value } S1 S2 S3
External invocations: example C1 S1 S2 S3 C2 Multicast invocation: table.bind(“name”, obj); Anycast invocation: table.lookup(“name”);
View Synchrony • View Synchrony All servers that survive from one view to the same next view execute the same set of invocations in the original view • View synchrony does not admit executions like this: S1 S2 S3 S4
Java RMI • Java RMI protocol:enables objects residing in different JVMs to communicate through remote method invocations Client Server method() return x Stub Server-sideRMI Runtime JVM1 JVM2 Network
Extending Java RMI • RMI group at Javasoft designed Java RMI in order to be extensible • TheRemoteRef interface enables programmers to write their own references to remote objects on the client-side • Unfortunately,RemoteRefs were not sufficient • There was no possibility to modify the behavior of RMI on the server side Client Stub Server-side RMI Runtime Server RemoteRef
Multicast RMI The Jgroup Approach (Previous Version) Client Server Server Statically generated – implements the remote interface Method dispatchers ClientProxy Server Proxy Server Proxy Server-side RMI Runtime Server-side RMI Runtime RMI Stub RMI Stub Fixed stub for server proxy
Designing a New Java RMI API • Java Software Requesto 078: a new Java framework • Fully customizable, on both the client- and the server-side • Based on Dynamic Proxy Classes (JDK 1.3)(No need for static stub generators) • Two different versions: • One-to-one (remote method invocations) • Voted down in JSR-078 • Being included in the "Davis" release of Jini • One-to-many (group method invocations) • To be developed... • We partecipated in the Java software process
Jini Extensible Remote Invocation (JERI) Client Server foo() bar() Dynamically Compiled Stub foo() bar() invoke() Dispatcher InvocationHandler dispatch() executeCall() ObjectEndpoint ServerEndpoint networkcommunication
Jgroup with 1-to-1 Customizable RMI Client Server Server Customized InvocationHandlerand Dispatcher Jgroup ClientProxy Jgroup Server Proxy Jgroup Server Proxy Jgroup Multicast RMI
Jgroup with 1-to-Many Customizable RMI Client Server Server Server Customized ObjectEndpoint and ServerEndpoint Jgroup ClientProxy Jgroup Server Proxy Jgroup Server Proxy Jgroup Server Proxy Multicast RMI
Thank You! http://cs.unibo.it/projects/jgroup