CVS update: JGroups/doc/manual/en/modules protocols.xml
"Bela Ban" <[email protected]> Wed, 27 Oct 2010 14:03:40 +0000
| Newsgroups | gmane.comp.java.javagroups.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: belaban
Date: 10/10/27 14:03:40
Modified: doc/manual/en/modules protocols.xml
Log:
ns
Revision Changes Path
1.34 +59 -1 JGroups/doc/manual/en/modules/protocols.xml
Index: protocols.xml
===================================================================
RCS file: /cvsroot/javagroups/JGroups/doc/manual/en/modules/protocols.xml,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- protocols.xml 1 Oct 2010 16:08:58 -0000 1.33
+++ protocols.xml 27 Oct 2010 14:03:40 -0000 1.34
@@ -958,7 +958,65 @@
done manually (see <xref linkend="Scopes"/> for details).
</para>
- ${SCOPE}
+ ${SCOPE}
+ </section>
+
+ <section id="STOMP">
+ <title>STOMP</title>
+ <para>
+ STOMP is a JGroups protocol which implements the <ulink url="http://stomp.codehaus.org">STOMP</ulink>
+ protocol. Currently (as of Nov 2010), transactions and acks are not implemented.
+ </para>
+ <para>
+ The location of a STOMP protocol in a stack is shown in <xref linkend="StompProtocol"/>.
+ </para>
+ <para>
+ <figure id="StompProtocol">
+ <title>STOMP in a protocol stack</title>
+ <graphic fileref="images/StompProtocol.png" format="PNG" align="left" scalefit="1" contentwidth="4in"/>
+ </figure>
+ </para>
+
+ <para>
+ The STOMP protocol should be near the top of the stack.
+ </para>
+ <para>
+ A STOMP instance listens on a TCP socket for client connections. The port and bind address of the
+ server socket can be defined via properties.
+ </para>
+ <para>
+ A client can send SUBSCRIBE commands for various destinations. When a SEND for a given destination is
+ received, STOMP adds a header to the message and broadcasts it to all cluster nodes. Every node then in
+ turn forwards the message to all of its connected clients which have subscribed to the same destination.
+ When a destination is not given, STOMP simply forwards the message to <emphasis>all</emphasis> connected
+ clients.
+ </para>
+ <para>
+ Traffic can be generated by clients and by servers. In the latter case, we could for example have code
+ executing in the address space of a JGroups (server) node. In the former case, clients use the SEND
+ command to send messages to a JGroups server and receive messages via the MESSAGE command. If there is
+ code on the server which generates messages, it is important that both client and server code agree
+ on a marshalling format, e.g. JSON, so that they understand each other's messages.
+ </para>
+ <para>
+ Clients can be written in any language, as long as they understand the STOMP protocol. Note that the
+ JGroups STOMP protocol implementation sends additional information (e.g. INFO) to clients; non-JGroups
+ STOMP clients should simply ignore them.
+ </para>
+ <para>
+ JGroups comes with a STOMP client (org.jgroups.client.StompConnection) and a demo (StompDraw). Both
+ need to be started with the address and port of a JGroups cluster node. Once they have been started,
+ the JGroups STOMP protocol will notify clients of cluster changes, which is needed so client can
+ failover to another JGroups server node when a node is shut down. E.g. when a client connects to C, after
+ connection, it'll get a list of endpoints (e.g. A,B,C,D). When C is terminated, or crashes, the client
+ automatically reconnects to any of the remaining nodes, e.g. A, B, or D. When this happens, a client
+ is also re-subscribed to the destinations it registered for.
+ </para>
+
+ <para>
+
+ </para>
+ ${STOMP}
</section>
</section>
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev