32:
314:
It can be used to create groups of processes whose members send messages to each other. JGroups enables developers to create reliable multipoint (multicast) applications where reliability is a deployment issue. JGroups also relieves the application developer from implementing this logic themselves.
1331:
The most powerful feature of JGroups is its flexible protocol stack, which allows developers to adapt it to exactly match their application requirements and network characteristics. The benefit of this is that you only pay for what you use. By mixing and matching protocols, various differing
1318:
Instances of the chat application can be run in the same process, on the same box, on different hosts in the local network, on hosts in different networks, or in the cloud. The code remains the same; only the configuration needs to be changed.
1322:
For example, in a local network, IP multicasting might be used. When IP multicasting is disabled, TCP can be used as transport. When run in the cloud, TCP plus a cloud discovery protocol would be used and so on...
1311:
Then, the channel joins cluster "ChatCluster". From now, messages can be sent and received, plus a new view (including this member) will be installed in all cluster members (including the newly joined member).
1480:
315:
This saves significant development time and allows for the application to be deployed in different environments without having to change code.
264:
115:
1332:
application requirements can be satisfied. JGroups comes with a number of protocols (but anyone can write their own), for example
1315:
Anything typed in the main loop results in the creation of a message to be sent to all cluster members, including the sender.
53:
1345:
1475:
207:
308:
230:
150:
96:
68:
42:
75:
49:
1455:
1386:
Building blocks are classes layered over JGroups channels, which provide higher-level abstractions such as
1337:
82:
64:
1460:
259:
280:
139:
275:
237:
20:
242:
1469:
89:
1356:
Reliable unicast and multicast message transmission. Lost messages are retransmitted
1341:
307:
is a library for reliable one-to-one or one-to-many communication written in the
31:
1423:
134:
324:
Group creation and deletion. Group members can be spread across LANs or WANs
267:
249:
1266:
Next, the receiver is set, which means that two callbacks will be invoked:
1353:
Discovery protocols to discover the initial membership for a joining node
348:
This code below demonstrates the implementation of a simple command-line
336:
Sending and receiving of member-to-group messages (point-to-multipoint)
330:
Membership detection and notification about joined/left/crashed members
213:
1450:
1359:
Failure detection: crashed members are excluded from the membership
339:
Sending and receiving of member-to-member messages (point-to-point)
1287:
when a new member joins, or an existing member leaves the cluster
1362:
Ordering protocols: Fifo, Total Order (sequencer or token based)
349:
25:
1259:
A JChannel is instantiated from an XML configuration (e.g.
291:
1307:
when a message from some other cluster member is received
1365:
Membership and notification of joined or crashed members
1374:
Encryption and authentication (including SASL support)
1263:). The channel is the endpoint for joining a cluster.
1368:
Network partition (split brain) detection and merging
1290:
1270:
1260:
286:
274:
258:
248:
236:
226:
206:
179:
161:
149:
133:
56:. Unsourced material may be challenged and removed.
1456:A simple request distribution example in JGroups
8:
128:
19:For the international holding company, see
1418:
1416:
158:
127:
116:Learn how and when to remove this message
333:Detection and removal of crashed members
1412:
1390:RPCs to individual or all cluster nodes
7:
1481:Java (programming language) software
54:adding citations to reliable sources
183:4.2.28.Final / April 10, 2024
14:
165:5.3.9.Final / July 12, 2024
30:
1350:Fragmentation of large messages
41:needs additional citations for
1461:A slideshow presenting JGroups
1:
327:Joining and leaving of groups
1424:"Releases · belaban/JGroups"
1399:Distributed atomic counters
1497:
1402:Distributed task execution
18:
585:"from %s: %s\n"
528:"** view: %s\n"
202:
156:
145:
354:
1327:Flexible protocol stack
477:"ChatCluster"
352:client using JGroups:
185:; 4 months ago
1336:Transport protocols:
167:; 53 days ago
50:improve this article
1476:Computer networking
1451:The JGroups website
1029:"udp.xml"
130:
1393:Distributed caches
1209:"Chat "
1113:"-props"
281:Apache License 2.0
1396:Distributed locks
1161:"-name"
798:"> "
747:InputStreamReader
302:
301:
197:
196:
151:Stable release(s)
126:
125:
118:
100:
1488:
1438:
1437:
1435:
1434:
1420:
1306:
1305:
1302:
1299:
1296:
1293:
1286:
1285:
1282:
1279:
1276:
1273:
1262:
1255:
1252:
1249:
1246:
1243:
1240:
1237:
1234:
1231:
1228:
1225:
1222:
1219:
1216:
1213:
1210:
1207:
1204:
1201:
1198:
1195:
1192:
1189:
1186:
1183:
1180:
1177:
1174:
1171:
1168:
1165:
1162:
1159:
1156:
1153:
1150:
1147:
1144:
1141:
1138:
1135:
1132:
1129:
1126:
1123:
1120:
1117:
1114:
1111:
1108:
1105:
1102:
1099:
1096:
1093:
1090:
1087:
1084:
1081:
1078:
1075:
1072:
1069:
1066:
1063:
1060:
1057:
1054:
1051:
1048:
1045:
1042:
1039:
1036:
1033:
1030:
1027:
1024:
1021:
1018:
1015:
1012:
1009:
1006:
1003:
1000:
997:
994:
991:
988:
985:
982:
979:
976:
973:
970:
967:
964:
961:
958:
955:
952:
949:
946:
943:
940:
937:
934:
931:
928:
925:
922:
919:
916:
913:
910:
907:
904:
901:
898:
895:
892:
889:
886:
883:
880:
877:
874:
871:
868:
865:
862:
859:
856:
853:
850:
847:
844:
841:
838:
835:
832:
829:
826:
823:
820:
817:
814:
811:
808:
805:
802:
799:
796:
793:
790:
787:
784:
781:
778:
775:
772:
769:
766:
763:
760:
757:
754:
751:
748:
745:
742:
739:
736:
733:
730:
727:
724:
721:
718:
715:
712:
709:
706:
703:
700:
697:
694:
691:
688:
685:
682:
679:
676:
673:
670:
667:
664:
661:
658:
655:
652:
649:
646:
643:
640:
637:
634:
631:
628:
625:
622:
619:
616:
613:
610:
607:
604:
601:
598:
595:
592:
589:
586:
583:
580:
577:
574:
571:
568:
565:
562:
559:
556:
553:
550:
547:
544:
541:
538:
535:
532:
529:
526:
523:
520:
517:
514:
511:
508:
505:
502:
499:
496:
493:
490:
487:
484:
481:
478:
475:
472:
469:
466:
463:
460:
457:
454:
451:
448:
445:
442:
439:
436:
433:
430:
427:
424:
421:
418:
415:
412:
409:
406:
403:
400:
397:
394:
391:
388:
385:
382:
379:
376:
373:
370:
367:
364:
361:
358:
298:
295:
293:
238:Operating system
222:
219:
217:
215:
193:
191:
186:
175:
173:
168:
159:
131:
121:
114:
110:
107:
101:
99:
58:
34:
26:
1496:
1495:
1491:
1490:
1489:
1487:
1486:
1485:
1466:
1465:
1447:
1442:
1441:
1432:
1430:
1422:
1421:
1414:
1409:
1384:
1382:Building blocks
1329:
1303:
1300:
1297:
1294:
1291:
1283:
1280:
1277:
1274:
1271:
1257:
1256:
1253:
1250:
1247:
1244:
1241:
1238:
1235:
1232:
1229:
1226:
1223:
1220:
1217:
1214:
1211:
1208:
1205:
1202:
1199:
1196:
1193:
1190:
1187:
1184:
1181:
1178:
1175:
1172:
1169:
1166:
1163:
1160:
1157:
1154:
1151:
1148:
1145:
1142:
1139:
1136:
1133:
1130:
1127:
1124:
1121:
1118:
1115:
1112:
1109:
1106:
1103:
1100:
1097:
1094:
1091:
1088:
1085:
1082:
1079:
1076:
1073:
1070:
1067:
1064:
1061:
1058:
1055:
1052:
1049:
1046:
1043:
1040:
1037:
1034:
1031:
1028:
1025:
1022:
1019:
1016:
1013:
1010:
1007:
1004:
1001:
998:
995:
992:
989:
986:
983:
980:
977:
974:
971:
968:
965:
962:
959:
956:
953:
950:
947:
944:
941:
938:
935:
932:
929:
926:
923:
920:
917:
914:
911:
908:
905:
902:
899:
896:
893:
890:
887:
884:
881:
878:
875:
872:
869:
866:
863:
860:
857:
854:
851:
848:
845:
842:
839:
836:
833:
830:
827:
824:
821:
818:
815:
812:
809:
806:
803:
800:
797:
794:
791:
788:
785:
782:
779:
776:
773:
770:
767:
764:
761:
758:
755:
752:
749:
746:
743:
740:
737:
734:
731:
728:
725:
722:
719:
716:
713:
710:
707:
704:
701:
698:
695:
692:
689:
686:
683:
680:
677:
674:
671:
668:
665:
662:
659:
656:
653:
650:
647:
644:
641:
638:
635:
632:
629:
626:
623:
620:
617:
614:
611:
608:
605:
602:
599:
596:
593:
590:
587:
584:
581:
578:
575:
572:
569:
566:
563:
560:
557:
554:
551:
548:
545:
542:
539:
536:
533:
530:
527:
524:
521:
518:
515:
512:
509:
506:
503:
500:
497:
494:
491:
488:
485:
482:
479:
476:
473:
470:
467:
464:
461:
458:
455:
452:
449:
446:
443:
440:
437:
434:
431:
428:
425:
422:
419:
416:
413:
410:
407:
404:
401:
398:
395:
392:
389:
386:
383:
380:
377:
374:
371:
369:ReceiverAdapter
368:
365:
362:
359:
356:
346:
321:
290:
212:
198:
189:
187:
184:
171:
169:
166:
122:
111:
105:
102:
59:
57:
47:
35:
24:
17:
12:
11:
5:
1494:
1492:
1484:
1483:
1478:
1468:
1467:
1464:
1463:
1458:
1453:
1446:
1445:External links
1443:
1440:
1439:
1411:
1410:
1408:
1405:
1404:
1403:
1400:
1397:
1394:
1391:
1383:
1380:
1379:
1378:
1375:
1372:
1369:
1366:
1363:
1360:
1357:
1354:
1351:
1348:
1328:
1325:
1309:
1308:
1288:
738:BufferedReader
726:BufferedReader
355:
345:
342:
341:
340:
337:
334:
331:
328:
325:
320:
317:
300:
299:
288:
284:
283:
278:
272:
271:
262:
256:
255:
252:
246:
245:
243:Cross-platform
240:
234:
233:
228:
224:
223:
210:
204:
203:
200:
199:
195:
194:
181:
177:
176:
163:
157:
154:
153:
147:
146:
143:
142:
137:
124:
123:
38:
36:
29:
15:
13:
10:
9:
6:
4:
3:
2:
1493:
1482:
1479:
1477:
1474:
1473:
1471:
1462:
1459:
1457:
1454:
1452:
1449:
1448:
1444:
1429:
1425:
1419:
1417:
1413:
1406:
1401:
1398:
1395:
1392:
1389:
1388:
1387:
1381:
1376:
1373:
1370:
1367:
1364:
1361:
1358:
1355:
1352:
1349:
1347:
1343:
1339:
1335:
1334:
1333:
1326:
1324:
1320:
1316:
1313:
1289:
1269:
1268:
1267:
1264:
353:
351:
343:
338:
335:
332:
329:
326:
323:
322:
318:
316:
312:
310:
306:
297:
289:
285:
282:
279:
277:
273:
269:
266:
263:
261:
257:
253:
251:
247:
244:
241:
239:
235:
232:
229:
225:
221:
211:
209:
205:
201:
182:
178:
164:
160:
155:
152:
148:
144:
141:
138:
136:
132:
120:
117:
109:
106:February 2018
98:
95:
91:
88:
84:
81:
77:
74:
70:
67: –
66:
62:
61:Find sources:
55:
51:
45:
44:
39:This article
37:
33:
28:
27:
22:
1431:. Retrieved
1427:
1385:
1371:Flow control
1342:IP multicast
1330:
1321:
1317:
1314:
1310:
1272:viewAccepted
1265:
1258:
492:viewAccepted
347:
313:
304:
303:
135:Developer(s)
112:
103:
93:
86:
79:
72:
60:
48:Please help
43:verification
40:
16:Java library
1377:Compression
840:toLowerCase
456:setReceiver
344:Code sample
1470:Categories
1433:2024-07-31
1428:github.com
1407:References
311:language.
227:Written in
208:Repository
190:2024-04-10
172:2024-07-12
76:newspapers
1014:Exception
948:Exception
915:Exception
867:Exception
720:Exception
690:Exception
609:getObject
597:getSource
268:multicast
65:"JGroups"
1182:continue
1134:continue
834:readLine
426:JChannel
378:JChannel
319:Features
294:.jgroups
265:reliable
220:/JGroups
218:/belaban
140:Bela Ban
1298:Message
1292:receive
1261:udp.xml
1203:println
963:finally
873:channel
663:Message
648:channel
618:private
555:Message
549:receive
471:connect
441:setName
417:channel
381:channel
375:private
366:extends
305:JGroups
287:Website
276:License
188: (
170: (
129:JGroups
90:scholar
1215:return
1191:System
1155:equals
1107:equals
1077:length
1035:String
1020:String
1011:throws
1002:String
990:static
987:public
969:client
927:client
912:throws
906:client
891:static
888:public
864:throws
852:public
804:System
780:System
753:System
717:throws
705:public
630:String
579:printf
567:System
543:public
522:printf
510:System
486:public
405:String
396:String
387:public
357:public
270:system
254:2.1 MB
214:github
92:
85:
78:
71:
63:
21:JGroup
1239:props
1224:start
1122:props
1023:props
942:catch
897:start
879:close
816:flush
792:print
765:while
684:catch
432:props
399:props
360:class
97:JSTOR
83:books
1281:view
1278:View
1245:name
1233:Chat
1176:args
1170:name
1149:args
1128:args
1101:args
1071:args
1068:<
1038:name
1005:args
996:main
993:void
903:Chat
894:void
855:void
843:());
822:send
771:true
708:void
675:line
669:null
654:send
633:line
624:send
621:void
612:());
546:void
534:view
501:view
498:View
489:void
462:this
447:name
408:name
390:Chat
363:Chat
309:Java
296:.org
260:Type
250:Size
231:Java
216:.com
69:news
1346:TCP
1344:),
1338:UDP
1301:msg
1248:));
1230:new
1197:out
1050:int
1044:for
978:();
975:end
936:();
933:run
921:try
882:();
858:end
837:().
819:();
810:out
786:out
762:));
744:new
735:new
711:run
678:));
660:new
642:try
603:msg
600:(),
591:msg
573:out
558:msg
516:out
423:new
350:IRC
292:www
180:4.x
162:5.x
52:by
1472::
1426:.
1415:^
1212:);
1164:))
1143:if
1116:))
1095:if
1086:++
861:()
828:in
801:);
759:in
729:in
714:()
699:{}
537:);
480:);
1436:.
1340:(
1304:)
1295:(
1284:)
1275:(
1254:}
1251:}
1242:,
1236:(
1227:(
1221:}
1218:;
1206:(
1200:.
1194:.
1188:}
1185:;
1179:;
1173:=
1167:{
1158:(
1152:.
1146:(
1140:}
1137:;
1131:;
1125:=
1119:{
1110:(
1104:.
1098:(
1092:{
1089:)
1083:i
1080:;
1074:.
1065:i
1062:;
1059:0
1056:=
1053:i
1047:(
1041:;
1032:;
1026:=
1017:{
1008:)
999:(
984:}
981:}
972:.
966:{
960:}
957:{
954:)
951:e
945:(
939:}
930:.
924:{
918:{
909:)
900:(
885:}
876:.
870:{
849:}
846:}
831:.
825:(
813:.
807:.
795:(
789:.
783:.
777:{
774:)
768:(
756:.
750:(
741:(
732:=
723:{
702:}
696:)
693:e
687:(
681:}
672:,
666:(
657:(
651:.
645:{
639:{
636:)
627:(
615:}
606:.
594:.
588:,
582:(
576:.
570:.
564:{
561:)
552:(
540:}
531:,
525:(
519:.
513:.
507:{
504:)
495:(
483:}
474:(
468:.
465:)
459:(
453:.
450:)
444:(
438:.
435:)
429:(
420:=
414:{
411:)
402:,
393:(
384:;
372:{
192:)
174:)
119:)
113:(
108:)
104:(
94:·
87:·
80:·
73:·
46:.
23:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.