You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2012/02/01 16:08:52 UTC

svn commit: r1239164 - in /activemq/activemq-apollo/trunk: apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/ apollo-website/src/documentation/

Author: chirino
Date: Wed Feb  1 15:08:52 2012
New Revision: 1239164

URL: http://svn.apache.org/viewvc?rev=1239164&view=rev
Log:
Enable WebSockets by default and enhance the doco.

Modified:
    activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo-ssl.xml
    activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo.xml
    activemq/activemq-apollo/trunk/apollo-website/src/documentation/user-manual.md

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo-ssl.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo-ssl.xml?rev=1239164&r1=1239163&r2=1239164&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo-ssl.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo-ssl.xml Wed Feb  1 15:08:52 2012
@@ -53,6 +53,8 @@
 
   <connector id="tcp" bind="tcp://0.0.0.0:61613" connection_limit="2000"/>
   <connector id="tls" bind="tls://0.0.0.0:61614" connection_limit="2000"/>
+  <connector id="ws"  bind="ws://0.0.0.0:61623"  connection_limit="2000"/>
+  <connector id="wss" bind="wss://0.0.0.0:61624" connection_limit="2000"/>
 
   <key_storage file="${apollo.base}/etc/keystore" password="password" key_password="password"/>
 

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo.xml?rev=1239164&r1=1239163&r2=1239164&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/etc/apollo.xml Wed Feb  1 15:08:52 2012
@@ -48,5 +48,6 @@
   <web_admin bind="http://127.0.0.1:61680"/>
 
   <connector id="tcp" bind="tcp://0.0.0.0:61613" connection_limit="2000"/>
+  <connector id="ws"  bind="ws://0.0.0.0:61623"  connection_limit="2000"/>
 
 </broker>

Modified: activemq/activemq-apollo/trunk/apollo-website/src/documentation/user-manual.md
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-website/src/documentation/user-manual.md?rev=1239164&r1=1239163&r2=1239164&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-website/src/documentation/user-manual.md (original)
+++ activemq/activemq-apollo/trunk/apollo-website/src/documentation/user-manual.md Wed Feb  1 15:08:52 2012
@@ -197,27 +197,48 @@ URI being written within an XML file.
 
 ##### WebSocket Transports
 
-The WebSocket transport uses the `ws://` URI scheme and the
-secure WebSocket transport uses the `wss://` URI scheme.  Like
-the TCP transport, the use the URI host
-and port to determine to which local interfaces to bind.  For example:
+HTML 5 introduced WebSockets, as a standardized way to communicate
+asynchronously with the server from a web page. This is an ideal channel for
+implementing asynchronous messaging in web pages. It can be used to
+encapsulate other protocols like STOMP and it avoids needing to use Comet
+techniques like long polling to deliver data to the Browser. Furthermore,
+since JavaScript easily handles text and JSON formatted data, the STOMP
+protocol is a natural choice for the messaging protocol to be used over
+WebSocket.
+
+The WebSocket transport uses the `ws://` URI scheme and the secure WebSocket
+transport uses the `wss://` URI scheme. Like the TCP transport, this
+transport uses the URI host and port to determine to which local interfaces
+to bind. For example:
 
 * `ws://0.0.0.0:61623` binds to all IPv4 interfaces on port 61623
 * `ws://[::]:61623` binds to all IPv4 and IPv6 interfaces on port 61623
 * `wss://127.0.0.1:0` binds to the loopback interface on a dynamic port
 
-The WebSocket URI also supports the following query parameters to fine tune the
-settings used on the socket:
+The WebSocket URI also supports the following query parameters to fine tune
+the settings used on the socket:
 
 * `binary_transfers` : Should data be sent to the client as binary blobs. Currently
   not all browsers support binary WebSocket data.  Defaults to false.
   
-Example usage:
+Example configuraiton:
 
 {pygmentize:: xml}
-<connector id="ws" bind="ws://0.0.0.0:61623?binary_transfers=true"/>
+<connector id="ws" bind="ws://0.0.0.0:61623?binary_transfers=false"/>
 {pygmentize}
 
+One thing worth noting is that web sockets (just as Ajax) implements the same
+origin policy, so you can access only brokers running on the same host as
+where the web page originated from.
+
+###### WebSocket Clients
+
+You can use one of the following JavaScript libraries to access
+the broker over WebSockets:
+
+* [Stomple](http://github.com/krukow/stomple)
+* [stomp-websocket](http://github.com/jmesnil/stomp-websocket)
+
 #### Virtual Hosts
 
 A virtual hosts allows ${project_name} to support multi tenant style