CVS update: JGroups/doc/design RELAY.txt
"Bela Ban" <[email protected]> Thu, 11 Nov 2010 10:34:23 +0000
| Newsgroups | gmane.comp.java.javagroups.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: belaban Date: 10/11/11 10:34:23 Modified: doc/design RELAY.txt Log: ns Revision Changes Path 1.6 +36 -11 JGroups/doc/design/RELAY.txt Index: RELAY.txt =================================================================== RCS file: /cvsroot/javagroups/JGroups/doc/design/RELAY.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RELAY.txt 9 Nov 2010 10:40:39 -0000 1.5 +++ RELAY.txt 11 Nov 2010 10:34:23 -0000 1.6 @@ -3,7 +3,7 @@ ======================================== Author: Bela Ban -Version: $Id: RELAY.txt,v 1.5 2010/11/09 10:40:39 belaban Exp $ +Version: $Id: RELAY.txt,v 1.6 2010/11/11 10:34:23 belaban Exp $ This is an enhanced version of DataCenterReplication.txt with the ability to send unicast messages and to provide views to the application, which list members of all local clusters. @@ -93,13 +93,14 @@ -------------- RELAY.up(msg): -- If not coord or RelayHeader is present: break -- If multicast message: - - Create new message M.dst=null, src=msg.src // no headers - - Wrap M and put it on the TCP channel -- Else: // unicast - - If hdr == RelayHeader.FORWARD: - - Wrap msg and put it on the TCP channel +- If not coord: pass up and break +- If RelayHeader present: + - If FORWARD: forward(msg); break + - If DISSEMINATE: pass up and break + - Default: break; +- Else: + - If multicast message: forward(msg) + - Pass up RELAY.down(msg): @@ -111,9 +112,33 @@ Receive message M from TCP channel: -- If sender = self: discard -- Set M.src=ProxyUUID(self,M.src) -- Add a RelayHeader to M +- Switch RelayHeader: + - Case FORWARD: + - If sender = self: discard + - Else: unwrap M into M2 and putOnLocalCluster(M2) + - Case VIEW: + // todo + + + +forward(msg): +- Copy msg to M +- Remove all headers from M +- Wrap M into a new message M2 +- Add RelayHeader.FORWARD to M2 +- Put M2 onto the TCP channel + +// TBD: should we leave headers ? They're going to be overwritten anyway when relaying the message + + +putOnLocalCluster(M): +- Set M.src=ProxyUUID(local_addr,M.src) +- Add a RelayHeader.DISSEMINATE to M - Put M on the local channel + +Issues: +- Do we copy the headers of a message M when M is relayed ? If not, an app won't be able to add their own headers + + ------------------------------------------------------------------------------ Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev