17
2002 Alberto Montresor The Jgroup Project Alberto Montresor Ozalp Babaoglu University of Bologna - Italy Department of Computer Science

The Jgroup Project Alberto Montresor Ozalp Babaoglu

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: The Jgroup Project Alberto Montresor Ozalp Babaoglu

1© 2002 Alberto Montresor

The Jgroup Project

Alberto MontresorOzalp Babaoglu

University of Bologna - ItalyDepartment of Computer Science

Page 2: The Jgroup Project Alberto Montresor Ozalp Babaoglu

2© 2002 Alberto Montresor

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

Page 3: The Jgroup Project Alberto Montresor Ozalp Babaoglu

3© 2002 Alberto Montresor

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)

Page 4: The Jgroup Project Alberto Montresor Ozalp Babaoglu

4© 2002 Alberto Montresor

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

ClientServer Server

Server

ObjectGroup

Page 5: The Jgroup Project Alberto Montresor Ozalp Babaoglu

5© 2002 Alberto Montresor

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

Page 6: The Jgroup Project Alberto Montresor Ozalp Babaoglu

6© 2002 Alberto Montresor

Synchronous Internal Invocations

Synchronous invocation

S1

S2

S3

int[] values =

group.getValue();

int getValue() {

// return value

}

Page 7: The Jgroup Project Alberto Montresor Ozalp Babaoglu

7© 2002 Alberto Montresor

Asynchronous Internal Invocations

S1

S2

S3

ValuesCB cb = new ValuesCB();

group.getValue(cb);

public class ValuesCB implements Callback { void results(Object value){...} }\

int getValue() {

// return value

}

Page 8: The Jgroup Project Alberto Montresor Ozalp Babaoglu

8© 2002 Alberto Montresor

External invocations: example

S1

S2

S3

C1

C2

Multicast invocation:

table.bind(“name”, obj);

Anycast invocation:

table.lookup(“name”);

Page 9: The Jgroup Project Alberto Montresor Ozalp Babaoglu

9© 2002 Alberto Montresor

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:

S2

S3

S4

S1

Page 10: The Jgroup Project Alberto Montresor Ozalp Babaoglu

10© 2002 Alberto Montresor

Java RMI

Java RMI protocol:enables objects residing in different JVMs to communicate through remote method invocations

Client Server

StubServer-side

RMI Runtime

Network

JVM1 JVM2

method() return x

Page 11: The Jgroup Project Alberto Montresor Ozalp Babaoglu

11© 2002 Alberto Montresor

Extending Java RMI

RMI group at Javasoft designed Java RMI in order to be extensible

• The RemoteRef 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

RemoteRef

Client StubServer-side

RMI Runtime Server

Page 12: The Jgroup Project Alberto Montresor Ozalp Babaoglu

12© 2002 Alberto Montresor

The Jgroup Approach (Previous Version)

ServerProxy

Server

ClientProxy

Client

Statically generated – implements the remote interface

Fixed stub for server proxy

RMI StubServer-side

RMI Runtime

RMI

ServerProxy

Server

Methoddispatchers

Multicast

RMI StubServer-side

RMI Runtime

Page 13: The Jgroup Project Alberto Montresor Ozalp Babaoglu

13© 2002 Alberto Montresor

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

Page 14: The Jgroup Project Alberto Montresor Ozalp Babaoglu

14© 2002 Alberto Montresor

Jini Extensible Remote Invocation (JERI)

InvocationHandler

Dynamically CompiledStub

ObjectEndpoint

Client

Dispatcher

ServerEndpoint

Server

foo()

invoke()

bar()

executeCall()

networkcommunication

dispatch()

foo()bar()

Page 15: The Jgroup Project Alberto Montresor Ozalp Babaoglu

15© 2002 Alberto Montresor

Jgroup ServerProxy

Server

Jgroup ClientProxy

Client

Customized InvocationHandlerand Dispatcher

Jgroup ServerProxy

Server

JgroupMulticast

Jgroup with 1-to-1 Customizable RMI

RMI

Page 16: The Jgroup Project Alberto Montresor Ozalp Babaoglu

16© 2002 Alberto Montresor

Jgroup with 1-to-Many Customizable RMI

Jgroup ServerProxy

Server

Jgroup ClientProxy

Client

Jgroup ServerProxy

Server

Jgroup ServerProxy

Server

Multicast RMI

Customized ObjectEndpointand ServerEndpoint

Page 17: The Jgroup Project Alberto Montresor Ozalp Babaoglu

17© 2002 Alberto Montresor

Thank You!

http://cs.unibo.it/projects/jgroup