【分散式通知技術-JGroups】

lijieshare發表於2017-12-28

 

 

什麼是JGroups

JGroups是一個可靠的組播通訊工具集(需要說明的是,這並不是說必須要使用IP Multicast,JGroups也可以使用TCP來實現)。JGroups可以用來建立一個組,這個組中的成員可以給其他成員傳送訊息。

 

JGroups is a toolkit for reliable messaging. It can be used to create clusters whose nodes can send messages to each other. The main features include

1)Cluster creation and deletion. Cluster nodes can be spread across LANs or WANs

2)Joining and leaving of clusters

3)Membership detection and notification about joined/left/crashed cluster nodes

4)Detection and removal of crashed nodes

5)Sending and receiving of node-to-cluster messages (point-to-multipoint)

6)Sending and receiving of node-to-node messages (point-to-point)

 

 

JGroups的主要功能如下:

1) 建立和刪除組,組成員可以分佈在區域網或廣域網中。 

2)組成員加入和離開組 

3)成員關係的自動偵測並通知成員的加入,離開和丟失(原文是crashed,大意就是說沒有通知的離開吧) 

4)偵測並刪除丟失的成員 

5)傳送和接收成員到組的訊息(點到多點) 

6)傳送和接收成員到成員的訊息(點到點)

 

 

Flexible Protocol Stack

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 application requirements can be satisfied.

JGroups comes with a large number of protocols (but anyone can write their own), for example

1)Transport protocols: UDP (IP Multicast) or TCP

2)Fragmentation of large messages

3)Reliable unicast and multicast message transmission. Lost messages are retransmitted

4)Failure detection: crashed nodes are excluded from the membership

5)Flow control to prevent slow receivers to get overrun by fast senders

6)Ordering protocols: FIFO, Total Order

7)Membership

8)Encryption

9)Compression

 



 

 

JGroups使用靈活的協議棧,這也是JGroups最強大(the most powerful)的功能,它允許開發人員配置協議棧來適用於他們自己的應用需求和網路特徵。這樣做的好處在於,開發人員只需要關注他們使用到的協議。通 過組合和匹配各種協議來滿足各種不同應用的需求。JGroups實現了一系列的協議(開發人員也可以編寫他們自己的協議),例如:

傳輸 協議:UDP(IP Multicast),TCP,JMS 分塊協議:FRAG和FRAG2用來將大訊息分塊傳送可靠傳輸協議: UNICAST和NAKACK 失敗偵測:FD(passive failure detection),VERIFY_SUSPECT。自動將丟失的成員排除到成員列表以外。排序協議:Atomic (傳送所有或者全部不發), FIFO, Causal, Total Order (序列或基於分塊) 成員協議:GMS(Group membership) 用來處理成員的加入和離開加密:AES/ECB/PKCS5Padding/RSA...對傳輸的資料進行加密其他還包括流量控 制,統計等

相關文章