没有合适的资源?快使用搜索试试~ 我知道了~
Reliable group communication with JGroups 3.x Preface This is the JGroups manual. It provides information about: 1. Installation and configuration 2. Using JGroups (the API) 3. Configuration of the JGroups protocols The focus is on how to use JGroups, not on how JGroups is implemented.
资源推荐
资源详情
资源评论
Reliable group communication
with JGroups 3.x
by Bela Ban (Red Hat, Inc.) and Vladimir Blagojevic (Red Hat, Inc.)
iii
Preface ............................................................................................................................. ix
1. Overview ...................................................................................................................... 1
1.1. Channel ............................................................................................................. 2
1.2. Building Blocks ................................................................................................... 2
1.3. The Protocol Stack ............................................................................................. 3
2. Installation and Configuration ..................................................................................... 5
2.1. Requirements ..................................................................................................... 5
2.2. Structure of the source version ............................................................................ 5
2.3. Building JGroups (source distribution only) ........................................................... 5
2.4. Testing your Setup ............................................................................................. 6
2.5. Running a Demo Program ................................................................................... 6
2.6. Using IP Multicasting without a network connection ............................................... 7
2.7. It doesn't work ! .................................................................................................. 8
2.8. Problems with IPv6 ............................................................................................. 8
2.9. Wiki ................................................................................................................... 9
2.10. I have discovered a bug ! .................................................................................. 9
2.11. Supported classes ............................................................................................ 9
2.11.1. Experimental .......................................................................................... 9
2.11.2. Unsupported ........................................................................................ 10
3. API ............................................................................................................................. 11
3.1. Utility classes .................................................................................................... 11
3.1.1. objectToByteBuffer(), objectFromByteBuffer() ........................................... 11
3.1.2. objectToStream(), objectFromStream() .................................................... 11
3.2. Interfaces ......................................................................................................... 11
3.2.1. MessageListener .................................................................................... 11
3.2.2. MembershipListener ............................................................................... 12
3.2.3. Receiver ................................................................................................ 13
3.2.4. ReceiverAdapter ..................................................................................... 13
3.2.5. ChannelListener ..................................................................................... 14
3.3. Address ............................................................................................................ 14
3.4. Message .......................................................................................................... 15
3.5. Header ............................................................................................................. 16
3.6. Event ............................................................................................................... 16
3.7. View ................................................................................................................. 17
3.7.1. ViewId ................................................................................................... 17
3.7.2. MergeView ............................................................................................. 17
3.8. JChannel .......................................................................................................... 18
3.8.1. Creating a channel ................................................................................. 18
3.8.2. Giving the channel a logical name ........................................................... 23
3.8.3. Generating custom addresses ................................................................. 23
3.8.4. Joining a cluster ..................................................................................... 24
3.8.5. Joining a cluster and getting the state in one operation ............................. 25
3.8.6. Getting the local address and the cluster name ........................................ 25
3.8.7. Getting the current view ......................................................................... 25
Reliable group communication ...
iv
3.8.8. Sending messages ................................................................................. 26
3.8.9. Receiving messages .............................................................................. 28
3.8.10. Receiving view changes ....................................................................... 29
3.8.11. Getting the group's state ....................................................................... 29
3.8.12. Disconnecting from a channel ............................................................... 32
3.8.13. Closing a channel ................................................................................ 32
4. Building Blocks ......................................................................................................... 35
4.1. MessageDispatcher ........................................................................................... 35
4.1.1. RequestOptions ...................................................................................... 36
4.1.2. Requests and target destinations ............................................................ 38
4.1.3. Example ................................................................................................ 39
4.2. RpcDispatcher .................................................................................................. 40
4.2.1. Example ................................................................................................ 41
4.2.2. Response filters ..................................................................................... 43
4.3. Asynchronous invocation in MessageDispatcher and RpcDispatcher .................... 45
4.4. ReplicatedHashMap .......................................................................................... 47
4.5. ReplCache ........................................................................................................ 48
4.6. Cluster wide locking .......................................................................................... 48
4.6.1. Locking and merges ............................................................................... 49
4.7. Cluster wide task execution ............................................................................... 50
4.8. Cluster wide atomic counters ............................................................................. 52
4.8.1. Design ................................................................................................... 54
5. Advanced Concepts ................................................................................................... 57
5.1. Using multiple channels .................................................................................... 57
5.2. Sharing a transport between multiple channels in a JVM ..................................... 57
5.3. Transport protocols ........................................................................................... 59
5.3.1. Message bundling .................................................................................. 62
5.3.2. UDP ...................................................................................................... 64
5.3.3. TCP ....................................................................................................... 65
5.3.4. TUNNEL ................................................................................................ 67
5.4. The concurrent stack ........................................................................................ 69
5.4.1. Overview ............................................................................................... 70
5.4.2. Elimination of up and down threads ......................................................... 73
5.4.3. Concurrent message delivery .................................................................. 74
5.4.4. Scopes: concurrent message delivery for messages from the same sender .. 74
5.4.5. Out-of-band messages ........................................................................... 75
5.4.6. Replacing the default and OOB thread pools ............................................ 75
5.4.7. Sharing of thread pools between channels in the same JVM ...................... 77
5.5. Using a custom socket factory ........................................................................... 77
5.6. Handling network partitions ................................................................................ 78
5.6.1. Merging substates .................................................................................. 79
5.6.2. The primary partition approach ................................................................ 79
5.6.3. The Split Brain syndrome and primary partitions ....................................... 81
5.7. Flushing: making sure every node in the cluster received a message .................... 82
v
5.8. Large clusters ................................................................................................... 83
5.8.1. Reducing chattiness ............................................................................... 83
5.9. STOMP support ................................................................................................ 84
5.10. Bridging between remote clusters .................................................................... 87
5.10.1. Views ................................................................................................... 89
5.10.2. Configuration ........................................................................................ 89
5.11. Relaying between multiple sites (RELAY2) ....................................................... 90
5.11.1. Relaying of multicasts ........................................................................... 92
5.11.2. Relaying of unicasts ............................................................................. 92
5.11.3. Invoking RPCs across sites .................................................................. 93
5.11.4. Configuration ........................................................................................ 93
5.12. Daisychaining .................................................................................................. 94
5.12.1. Traditional N-1 approach ....................................................................... 95
5.12.2. Daisychaining approach ........................................................................ 95
5.12.3. Switch usage ....................................................................................... 96
5.12.4. Performance ........................................................................................ 96
5.12.5. Configuration ........................................................................................ 96
5.13. Tagging messages with flags ........................................................................... 96
5.14. Performance tests ........................................................................................... 98
5.14.1. MPerf ................................................................................................... 98
5.15. Ergonomics ................................................................................................... 101
5.16. Supervising a running stack ........................................................................... 101
5.17. Probe ........................................................................................................... 103
6. Writing protocols ..................................................................................................... 109
6.1. Writing user defined headers ........................................................................... 109
7. List of Protocols ...................................................................................................... 113
7.1. Properties availabe in every protocol ................................................................ 113
7.2. Transport ........................................................................................................ 113
7.2.1. UDP .................................................................................................... 118
7.2.2. TCP ..................................................................................................... 119
7.2.3. TUNNEL .............................................................................................. 120
7.3. Initial membership discovery ............................................................................ 120
7.3.1. Discovery ............................................................................................. 121
7.3.2. PING ................................................................................................... 121
7.3.3. TCPPING ............................................................................................. 122
7.3.4. TCPGOSSIP ........................................................................................ 122
7.3.5. MPING ................................................................................................ 123
7.3.6. FILE_PING .......................................................................................... 124
7.3.7. JDBC_PING ......................................................................................... 124
7.3.8. BPING ................................................................................................. 125
7.3.9. RACKSPACE_PING ............................................................................. 125
7.3.10. S3_PING ............................................................................................ 126
7.3.11. SWIFT_PING ..................................................................................... 127
7.3.12. AWS_PING ........................................................................................ 128
剩余171页未读,继续阅读
资源评论
tedalao4193
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功