README
1
2
3
4 JGroups - A Framework for Group Communication in Java
5 ========================================================
6
7 March 3, 1998
8
9 Bela Ban
10 4114 Upson Hall
11 Cornell University
12 Ithaca, NY 14853
13 bba@cs.cornell.edu
14 belaban@yahoo.com
15
16
17JGroups is a Java library for reliable group communication. It
18consists of 3 parts: (1) a socket-like API for application
19development, (2) a protocol stack, which implements reliable
20communication, and (3) a set of building blocks, which give the
21developer high-level abstractions (e.g. ReplicatedHashMap, an
22implementation of java.util.Map.
23
24The API (a channel) looks like a socket: there are methods for joining
25and leaving groups, sending and receiving messages,
26getting the shared group state, and registering for notifications when
27a member joins, or an existing member leaves or crashes.
28
29The protocol stack is a list of protocols, through which each
30message passes. Each protocol implements an up() and down()
31method, and may modify, reorder, encrypt, fragment/unfragment, drop,
32or pass a message up/down. The protocol stack is created
33according to a specification given when a channel is created. New
34protocols can be plugged into the stack easily.
35
36Building blocks hide the channel and provide a higher abstraction.
37Example: ReplicatedHashMap implements java.util.Mapand implements
38all methods that change the map (clear(), put(), remove()).
39Those methods are invoked on all hashmap instances in the same group
40simultaneously, so that all hashmaps have the same state.
41A new hashmap uses a state transfer protocol to initially obtain
42the shared group state from an existing member. This allows for
43replication of data structures across processes.
44
45
46
47Group communication is important in the following situations:
48
49 - A service has to be replicated for availability. As long as at
50 least one of the servers remains operational, the service itself
51 remains operational
52
53 - Service requests have to be balanced between a set of servers
54
55 - A large number of objects have to be managed as one entity (e.g. a
56 management domain)
57
58 - Notification service / push technology: receivers subscribe to a
59 channel, senders send data to the channels, channels distribute
60 data to all receivers subscribed to the channel.
61 Used for example for video distribution, videoconferencing
62
63
64JGroups deliberately models a rather low-level message-oriented
65middleware (MOM) model. The reason is that we don't want to impose a
66one-size-fits-all model on the programmer, who usually will want to
67extend the model in various (previously unconceived) ways anyway.
68
69Providing low level Java classes allows the programmer to
70extend/replace classes at will, as the granularity of the system is
71finer.
72
73
74
75
76