SlideShare una empresa de Scribd logo
1 de 210
HornetQ & The Web
How HornetQ Embraces the Web and Its Different Forms




                   Jeff Mesnil
Who?
Who?

•Jeff Mesnil
•Software Developer
•Red Hat, JBoss
•jmesnil@{redhat|gmail}.com
•http://jmesnil.net/
•twitter: @jmesnil
What?
What?

•What is HornetQ?
What?

•What is HornetQ?
•HornetQ & The Web
What?

•What is HornetQ?
•HornetQ & The Web
•HornetQ & REST
What?

•What is HornetQ?
•HornetQ & The Web
•HornetQ & REST
•HornetQ & HTML5 WebSocket
What?

•What is HornetQ?
•HornetQ & The Web
•HornetQ & REST
•HornetQ & HTML5 WebSocket
•Pros & Cons
What?

•What is HornetQ?
•HornetQ & The Web
•HornetQ & REST
•HornetQ & HTML5 WebSocket
•Pros & Cons
•Questions?
•http://jboss.org/hornetq/
•http://jboss.org/hornetq/
•JBoss community project
•http://jboss.org/hornetq/
•JBoss community project
•Open Source (Apache License 2.0)
•http://jboss.org/hornetq/
•JBoss community project
•Open Source (Apache License 2.0)
•Multi-protocol asynchronous messaging system
•http://jboss.org/hornetq/
•JBoss community project
•Open Source (Apache License 2.0)
•Multi-protocol asynchronous messaging system
•Performance
•http://jboss.org/hornetq/
•JBoss community project
•Open Source (Apache License 2.0)
•Multi-protocol asynchronous messaging system
•Performance
•Usability
Usability
Usability

•Ease of use (configuration, deployment)
Usability

•Ease of use (configuration, deployment)
•Simple API
Usability

•Ease of use (configuration, deployment)
•Simple API
•Documentation
Usability

•Ease of use (configuration, deployment)
•Simple API
•Documentation
•90+ examples
Usability

•Ease of use (configuration, deployment)
•Simple API
•Documentation
•90+ examples
 •A feature without documentation and example is
   useless
Usability

•Ease of use (configuration, deployment)
•Simple API
•Documentation
•90+ examples
 •A feature without documentation and example is
   useless
•Minimal third-party dependencies
Deployment
Deployment

•Fully functional standalone messaging server
Deployment

•Fully functional standalone messaging server
•Default messaging provider for JBoss AS 6
Deployment

•Fully functional standalone messaging server
•Default messaging provider for JBoss AS 6
•Integrated with any Java EE application server using its
 JCA adaptor
Deployment

•Fully functional standalone messaging server
•Default messaging provider for JBoss AS 6
•Integrated with any Java EE application server using its
 JCA adaptor
•Use dependency-injection framework to embed it in
 your application
Generic Messaging
   Architecture
Generic Messaging
           Architecture

•Simple set of POJOs (JMS-agnostic)
Generic Messaging
           Architecture

•Simple set of POJOs (JMS-agnostic)
•No hard dependencies on JMS, JNDI, JCA
Generic Messaging
           Architecture

•Simple set of POJOs (JMS-agnostic)
•No hard dependencies on JMS, JNDI, JCA
•JMS is 1 way to use HornetQ
Generic Messaging
           Architecture

•Simple set of POJOs (JMS-agnostic)
•No hard dependencies on JMS, JNDI, JCA
•JMS is 1 way to use HornetQ
•2 ways to use HornetQ on the Web
Generic Messaging
            Architecture

•Simple set of POJOs (JMS-agnostic)
•No hard dependencies on JMS, JNDI, JCA
•JMS is 1 way to use HornetQ
•2 ways to use HornetQ on the Web
•Different messaging APIs / protocols in a single
 consistent messaging system
Performance
Performance

•Very high performance journal
Performance

•Very high performance journal
 •No relational database
Performance

•Very high performance journal
 •No relational database
 •Java NIO
Performance

•Very high performance journal
 •No relational database
 •Java NIO
 •JNI interface to Linux asynchronous IO
Performance

•Very high performance journal
 •No relational database
 •Java NIO
 •JNI interface to Linux asynchronous IO
•Very fast transport layer
Performance

•Very high performance journal
 •No relational database
 •Java NIO
 •JNI interface to Linux asynchronous IO
•Very fast transport layer
 •Netty
Performance

•Very high performance journal
 •No relational database
 •Java NIO
 •JNI interface to Linux asynchronous IO
•Very fast transport layer
 •Netty
•Don’t take my word for it!
Performance

•Very high performance journal
 •No relational database
 •Java NIO
 •JNI interface to Linux asynchronous IO
•Very fast transport layer
 •Netty
•Don’t take my word for it!
 •http://www.spec.org/jms2007/results/jms2007.html
Supported Protocols
Supported Protocols


•Core
•JMS
•STOMP
•REST
HornetQ Core Protocol
HornetQ Core Protocol

•Java
HornetQ Core Protocol

•Java
•Optimized
HornetQ Core Protocol

•Java
•Optimized
•Send messages to an address
HornetQ Core Protocol

•Java
•Optimized
•Send messages to an address
•Consume messages from a queue
HornetQ Core Protocol

•Java
•Optimized
•Send messages to an address
•Consume messages from a queue
•Bindings between addresses and queues and queues
 and consumers define the messaging model
HornetQ Core
HornetQ Core
HornetQ Core

 Address
HornetQ Core

Producer    Address
HornetQ Core

           message
Producer              Address
            sends
HornetQ Core

           message
Producer              Address
            sends




                                    Consumer
HornetQ Core

           message
Producer              Address
            sends




                                Queue   Consumer
HornetQ Core

           message
Producer              Address
            sends




                                Queue   Consumer
HornetQ Core

           message
Producer              Address
            sends




                                        message

                                Queue             Consumer
HornetQ Core

           message
Producer              Address
            sends



                                ?
                                        message

                                Queue             Consumer
JMS API
JMS API


•Java / Java EE
JMS API


•Java / Java EE
•Point-to-Point (queues)
 •1 producer - 1 consumer
JMS API


•Java / Java EE
•Point-to-Point (queues)
 •1 producer - 1 consumer
•Publish/Subscribe (topics)
 •1 producer - N consumers
JMS Queue
JMS Queue

Address
JMS Queue

Address




          Queue
JMS Queue

Address




          Queue
JMS Queue

Address




          Queue   Consumer 1



                  Consumer 2
JMS Queue

Address




          Queue   Consumer 1



                  Consumer 2
JMS Queue

Producer   Address




                     Queue   Consumer 1



                             Consumer 2
JMS Queue

           message
Producer             Address
            sends




                               Queue   Consumer 1



                                       Consumer 2
JMS Queue

           message
Producer             Address
            sends




                                       message
                               Queue             Consumer 1



                                                 Consumer 2
JMS Queue

           message
Producer             Address
            sends




                               Queue   Consumer 1



                                       Consumer 2
JMS Queue

           message
Producer             Address
            sends




                               Queue             Consumer 1



                                                 Consumer 2
                                       message
JMS Topic
JMS Topic

Producer
JMS Topic

Producer




                       Consumer 1



                       Consumer 2
JMS Topic

Producer    Address




                       Consumer 1



                       Consumer 2
JMS Topic

Producer    Address




                      Queue   Consumer 1



                              Consumer 2
JMS Topic

Producer    Address




                      Queue   Consumer 1



                      Queue   Consumer 2
JMS Topic

Producer    Address




                      Queue   Consumer 1



                      Queue   Consumer 2
JMS Topic

           message
Producer             Address
            sends




                               Queue   Consumer 1



                               Queue   Consumer 2
JMS Topic

           message
Producer             Address
            sends




                               Queue   Consumer 1



                               Queue   Consumer 2
JMS Topic

           message
Producer             Address
            sends




                                       message
                               Queue             Consumer 1



                               Queue             Consumer 2
                                       message
JMS Models
JMS Models

•JMS Queue
 •1 address - 1 queue binding
 •Many consumers for the queue
JMS Models

•JMS Queue
 •1 address - 1 queue binding
 •Many consumers for the queue
•JMS Topic
 •1 address - many queues binding
 •1 single consumer per queue
STOMP
STOMP


•http://stomp.codehaus.org/
STOMP


•http://stomp.codehaus.org/
•Text-orientated messaging protocol
STOMP


•http://stomp.codehaus.org/
•Text-orientated messaging protocol
•Interoperability
STOMP


•http://stomp.codehaus.org/
•Text-orientated messaging protocol
•Interoperability
•Clients for many languages
STOMP


•http://stomp.codehaus.org/
•Text-orientated messaging protocol
•Interoperability
•Clients for many languages
•Simple and flexible (headers, ack, transactions)
STOMP
$ telnet localhost 61613
CONNECT
login: jmesnil
passcode: mypassword
^@

SEND
destination:/queue/myqueue

this is my message body
^@
REST
REST



•HTTP-Based RESTful API
•More on that in a minute...
Many Other Features
Many Other Features

•Clustering, HA, Failover
•Bridges and Diverts
•Management (JMX, JMS)
•Dead Letters, Expiration
•...
•http://community.jboss.org/wiki/HornetQFeatures
But
But


HornetQ & The Web
HornetQ & The Web
HornetQ & The Web
•Web is everywhere
HornetQ & The Web
•Web is everywhere
•Cloud Computing
HornetQ & The Web
•Web is everywhere
•Cloud Computing
•Integration
 •Entreprise environment
 •Heterogenous platforms
HornetQ & The Web
•Web is everywhere
•Cloud Computing
•Integration
 •Entreprise environment
 •Heterogenous platforms
•End-user applications
 •Web Browsers
 •RIA
HornetQ & The Web
•Web is everywhere
•Cloud Computing
•Integration
 •Entreprise environment
 •Heterogenous platforms
•End-user applications
 •Web Browsers
 •RIA
•More and more web-based applications needs
 messaging
Messaging and the Web
Messaging and the Web


•Asynchronous
•Loosely-coupled
•Distributed
HornetQ and the Web
HornetQ and the Web


•HornetQ Core/JMS over HTTP
HornetQ and the Web


•HornetQ Core/JMS over HTTP
•REST API over HTTP
HornetQ and the Web


•HornetQ Core/JMS over HTTP
•REST API over HTTP
•STOMP over HTML5 WebSocket
HornetQ Over HTTP
HornetQ Over HTTP


•Use HTTP instead of TCP as the transport layer
•Work around firewalls
•Not Web-friendly
 •Requires HornetQ Java client library
 •HornetQ Core wireformat encoded
HornetQ REST API
HornetQ REST API


•RESTful API to do messaging over HTTP
HornetQ REST API


•RESTful API to do messaging over HTTP
•http://en.wikipedia.org/wiki/
 Representational_State_Transfer
HornetQ REST API


•RESTful API to do messaging over HTTP
•http://en.wikipedia.org/wiki/
 Representational_State_Transfer
•Based on RESTEasy
RESTEasy
RESTEasy
• http://www.jboss.org/resteasy/
• JBoss community project
• Open Source (Apache license 2.0)
• Fully certified JAX-RS implementation
• Portable to any application server/web container
• Rich set of providers (XML, JSON, YAML, Atom, etc.)
• JAXB marshalling into XML, JSON, etc.
• Wrappers for maps, arrays, lists, and sets of JAXB Objects.
• GZIP content-encoding
• Rich interceptor model
• EJB, Seam, Guice, Spring, and Spring MVC integration
TomTom Work [1/2]
TomTom Work [1/2]

•http://www.tomtomwork.com/en/products/what.xml
•Fleet management solution
•Mobile navigation system connected to the web-based
 management and communication service
•Two-way communication and navigation
 •Vehicles send their position and other infos
 •Receive incoming text messages from TomTom
   servers
TomTom Work [2/2]
TomTom Work [2/2]
•GPS devices in the vehicles (GPRS / TCP)
•TomTom data center
 •JMS
 •DB
 •GUI + REST Web Services
•120K+ devices
•150K JMS messages/min at peak time (2 peaks every
 day)
•120M JMS messages/day
Demo
Demo

•Application to track the location of users
Demo

•Application to track the location of users
 •Users will use their mobile phones to broadcast their
  position (REST API)
Demo

•Application to track the location of users
 •Users will use their mobile phones to broadcast their
  position (REST API)
 •Web application to monitor the users’ positions
  (STOMP over HTML5 WebSocket)
Demo

•Application to track the location of users
 •Users will use their mobile phones to broadcast their
  position (REST API)
 •Web application to monitor the users’ positions
  (STOMP over HTML5 WebSocket)
 •Application to keep a log of everybody’s moves (JMS)
JMS Topic




            JMS Monitoring Application
HornetQ Server
hornetq-jms.xml

<configuration>
  <topic name="trackers">
   <entry name="/topic/trackers" />
 </topic>
</configuration>

hornetq-configuration.xml

<acceptor name="jms">
  <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-
class>
</acceptor>
<acceptor name="websockets">
  <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-
class>
  <param key="protocol" value="stomp_ws" />
  <param key="port" value="61614" />
</acceptor>
RESTEasy Configuration
WEB-INF/web.xml

<listener>
   <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-
class>
</listener>
<listener>
   <listener-class>org.hornetq.rest.integration.HornetqBootstrapListener</listener-class>
</listener>
<listener>

 <listener-class>org.hornetq.rest.integration.RestMessagingBootstrapListener</
listener-class>
</listener>

...

<context-param>

 <param-name>rest.messaging.config.file</param-name>

 <param-value>rest-config.xml</param-value>
</context-param>
RESTEasy Configuration
rest-config.xml

<rest-messaging>

 <server-in-vm-id>0</server-in-vm-id>

 <use-link-headers>false</use-link-headers>

 <default-durable-send>false</default-durable-send>

 <dups-ok>true</dups-ok>

 <topic-push-store-dir>topic-push-store</topic-push-store-dir>

 <queue-push-store-dir>queue-push-store</queue-push-store-dir>

 <producer-session-pool-size>10</producer-session-pool-size>

 <session-timeout-task-interval>1</session-timeout-task-interval>

 <consumer-session-timeout-seconds>300</consumer-session-timeout-
seconds>

 <consumer-window-size>-1</consumer-window-size>
</rest-messaging>
Demo
HornetQ REST API
HornetQ REST API
• RESTful messaging specification
  • http://www.jboss.org/reststar/specifications/messaging.html
HornetQ REST API
• RESTful messaging specification
  • http://www.jboss.org/reststar/specifications/messaging.html
• Simple REST/HTTP interface to access HornetQ
HornetQ REST API
• RESTful messaging specification
  • http://www.jboss.org/reststar/specifications/messaging.html
• Simple REST/HTTP interface to access HornetQ
• Usable by any programming language that has an HTTP client
  library
HornetQ REST API
• RESTful messaging specification
  • http://www.jboss.org/reststar/specifications/messaging.html
• Simple REST/HTTP interface to access HornetQ
• Usable by any programming language that has an HTTP client
  library
• Zero client footprint (no libraries to download, install and
  deploy)
HornetQ REST API
• RESTful messaging specification
  • http://www.jboss.org/reststar/specifications/messaging.html
• Simple REST/HTTP interface to access HornetQ
• Usable by any programming language that has an HTTP client
  library
• Zero client footprint (no libraries to download, install and
  deploy)
• No envelope (à la SOAP) or feed (à la Atom) format requirements
  • the HTTP request/response is the message
HornetQ REST API
• RESTful messaging specification
  • http://www.jboss.org/reststar/specifications/messaging.html
• Simple REST/HTTP interface to access HornetQ
• Usable by any programming language that has an HTTP client
  library
• Zero client footprint (no libraries to download, install and
  deploy)
• No envelope (à la SOAP) or feed (à la Atom) format requirements
  • the HTTP request/response is the message
• Ligthweight interoperability
HornetQ REST API
• RESTful messaging specification
  • http://www.jboss.org/reststar/specifications/messaging.html
• Simple REST/HTTP interface to access HornetQ
• Usable by any programming language that has an HTTP client
  library
• Zero client footprint (no libraries to download, install and
  deploy)
• No envelope (à la SOAP) or feed (à la Atom) format requirements
  • the HTTP request/response is the message
• Ligthweight interoperability
• Pub/Sub (topics) and Point-to-point (queues)
HornetQ REST API
HornetQ REST API


•Follow the headers
HornetQ REST API


•Follow the headers
•Duplicate Detection
HornetQ REST API


•Follow the headers
•Duplicate Detection
•Persistent messages ?durable=true
Send a Message [1/2]

=> Query the resource URL

HEAD /topics/jms.topic.trackers HTTP/1.1
Host: example.com

--- Response ---
HTTP/1.1 200 Ok
msg-create: http://example.com/topics/jms.topic.trackers/create
msg-create-with-id: http://example.com/topics/jms.topic.trackers/create/{id}
Send a Message [2/2]
POST /topics/jms.topic.trackers/create
Host: example.com
Content-Type: application/json

{
    "alias": "jmesnil",
    "position": {
       "coords": {
          "longitude": 65.735344446666666,
          "latitude": 35.198200083333326
       },
       "timestamp": 1285943662645
    }
}

--- Response ---
HTTP/1.1 201 Created
msg-create-next: http://example.com/topics/jms.topic.trackers/create/002
Receive a Message - Pull

=> query the resource URL

HEAD /topics/jms.topic.trackers HTTP/1.1
Host: example.com

--- Response ---
HTTP/1.1 200 Ok
msg-create: http://example.com/topics/jms.topic.trackers/create
msg-pull-subscriptions: http://example.com/topics/jms.topic.trackers/pull-
subscriptions
msg-push-subscriptions: http://example.com/topics/jms.topic.trackers/push-
subscriptions
Receive a Message - Pull

=> create a subscription by doing an empty POST on the msg-pull-subscriptions URL

POST /topics/jms.topic.trackers/pull-subscriptions HTTP/1.1
Host: example.com

--- Response ---
HTTP/1.1 201 Created
Location: http://example.com/topics/jms.topic.trackers/pull-subscriptions/auto-
ack/222
msg-consume-next: http://example.com/topics/jms.topic.trackers/pull-
subscriptions/auto-ack/222/consume-next-1
Receive a Message - Pull
=> consume the message by POSTing on the subscription

POST /topics/jms.topic.trackers/pull-subscriptions/auto-ack/222/consume-next-1
Host: example.com

--- Response ---
HTTP/1.1 200 Ok
Content-Type: application/json
msg-consume-next: http://example.com/topics/jms.topic.trackers/pull-subscriptions/
auto-ack/222/consume-next-2

{
    "alias": "jmesnil",
    "position": {
       "coords": {
          "longitude": 65.735344446666666,
          "latitude": 35.198200083333326,
          ...
       },
       "timestamp": 1285943662645
    }
}
Receive a Message - Pull

 => if there is no message to consume, will return 503

POST /queues/jms.queue.bar/pull-consumers/consume-next-2
Host: example.com

--- Response ---
Http/1.1 503 Service Unavailable
Retry-After: 5
msg-consume-next: http://example.com/queues/jms.queue.bar/pull-consumers/
333/consume-next-2
Receive a Message -

=> query the Topic resource URL

HEAD /topics/jms.topic.trackers HTTP/1.1
Host: example.com

--- Response ---
HTTP/1.1 200 Ok
msg-create: http://example.com/topics/jms.topic.trackers/create
msg-pull-subscriptions: http://example.com/topics/jms.topic.trackers/pull-
subscriptions
msg-push-subscriptions: http://example.com/topics/jms.topic.trackers/push-
subscriptions
Receive a Message -
=> create a push subscription

POST /topics/jms.topic.trackers/push-subscriptions
Host: example.com
Content-Type: application/xml

<push-topic-registration>
 <link rel="template" href="http://somewhere.com/resources/{id}/messages"
method="POST"/>
</push-topic registration>

--- Response ---
HTTP/1.1 201 Created
Location: http://example.com/topics/jms.topic.trackers/push-subscriptions/
1-333-1212

=> new messages will be POSTed to http://somewhere.com/resources/{id}/messages
URL
Create a Destination

POST /topics
Host: example.com
Content-Type: application/hornetq.jms.topic+xml

<topic name="testTopic" />

--- Response ---
HTTP/1.1 201 Created
Location: http://example.com/topics/jms.topic.testTopic
HTML5
HTML5


•http://www.w3.org/TR/html5/
HTML5


•http://www.w3.org/TR/html5/
•Revision of HTML markup language
HTML5


•http://www.w3.org/TR/html5/
•Revision of HTML markup language
•JavaScript APIs
HTML5


•http://www.w3.org/TR/html5/
•Revision of HTML markup language
•JavaScript APIs
 •canvas, geolocation, video, audio, etc.
HTML5


•http://www.w3.org/TR/html5/
•Revision of HTML markup language
•JavaScript APIs
 •canvas, geolocation, video, audio, etc.
 •WebSocket!
HTML5 WebSocket
HTML5 WebSocket
•«TCP for the Web»...
HTML5 WebSocket
•«TCP for the Web»...
•bidirectional communication between the browser and
 the web server
HTML5 WebSocket
•«TCP for the Web»...
•bidirectional communication between the browser and
 the web server
•same-origin security model
HTML5 WebSocket
•«TCP for the Web»...
•bidirectional communication between the browser and
 the web server
•same-origin security model
•JavaScript API in the browser
HTML5 WebSocket
•«TCP for the Web»...
•bidirectional communication between the browser and
 the web server
•same-origin security model
•JavaScript API in the browser
 •http://dev.w3.org/html5/websockets/
HTML5 WebSocket
•«TCP for the Web»...
•bidirectional communication between the browser and
 the web server
•same-origin security model
•JavaScript API in the browser
 •http://dev.w3.org/html5/websockets/
•WebSocket protocol on the server
HTML5 WebSocket
•«TCP for the Web»...
•bidirectional communication between the browser and
 the web server
•same-origin security model
•JavaScript API in the browser
 •http://dev.w3.org/html5/websockets/
•WebSocket protocol on the server
 •http://tools.ietf.org/html/draft-hixie-
   thewebsocketprotocol-76
STOMP Over WebSocket
STOMP Over WebSocket
•WebSocket instead of TCP
STOMP Over WebSocket
•WebSocket instead of TCP
•STOMP as the messaging protocol
STOMP Over WebSocket
•WebSocket instead of TCP
•STOMP as the messaging protocol
•JavaScript libraries to send and receive STOMP
 messages
 •http://jmesnil.net/stomp-websocket/doc/
 •http://github.com/krukow/stomple
STOMP Over WebSocket
•WebSocket instead of TCP
•STOMP as the messaging protocol
•JavaScript libraries to send and receive STOMP
 messages
 •http://jmesnil.net/stomp-websocket/doc/
 •http://github.com/krukow/stomple
•ActiveMQ, RabbitMQ(?)
STOMP Over WebSocket
•WebSocket instead of TCP
•STOMP as the messaging protocol
•JavaScript libraries to send and receive STOMP
 messages
 •http://jmesnil.net/stomp-websocket/doc/
 •http://github.com/krukow/stomple
•ActiveMQ, RabbitMQ(?)
•Talks about adding it to STOMP 2.0 specification
STOMP Over WebSocket
•WebSocket instead of TCP
•STOMP as the messaging protocol
•JavaScript libraries to send and receive STOMP
 messages
 •http://jmesnil.net/stomp-websocket/doc/
 •http://github.com/krukow/stomple
•ActiveMQ, RabbitMQ(?)
•Talks about adding it to STOMP 2.0 specification
•Work with text only (no bytes)
STOMP Over WebSocket
•WebSocket instead of TCP
•STOMP as the messaging protocol
•JavaScript libraries to send and receive STOMP
 messages
 •http://jmesnil.net/stomp-websocket/doc/
 •http://github.com/krukow/stomple
•ActiveMQ, RabbitMQ(?)
•Talks about adding it to STOMP 2.0 specification
•Work with text only (no bytes)
•Receive message by push-only
Demo
STOMP Over WebSocket
STOMP Over WebSocket


•JavaScript-based
STOMP Over WebSocket


•JavaScript-based
•Looks like other STOMP clients
STOMP Over WebSocket


•JavaScript-based
•Looks like other STOMP clients
•Send and receive text-only messages
Create a Client
// create a client
var url = "ws://example.com:61614/stomp";
var client = Stomp.client(url);

// connect to the STOMP server
client.connect(login, passcode, function() {
    // called back after the client is connected
    // and authenticated to the server
});

...

// disconnect from the server
client.disconnect();
Send and Receive Messages
// send a message
var tracker = ...; // retrieved from Geolocation API
client.send("jms.topic.trackers", {}, JSON.stringify(tracker));


// subscribe to a destination
var sub_id = client.subscribe("jms.topic.trackers", function(message) {
   // called back everytime a message is sent to the destination
   var tracker = JSON.parse(message.body);
   ...
});

// unsubscribe from a destination
client.unsubscribe(sub_id);
REST or WebSocket?
REST or WebSocket?

•Different usage and timeline
REST or WebSocket?

•Different usage and timeline
•WebSocket
REST or WebSocket?

•Different usage and timeline
•WebSocket
 •(+) TCP-like
REST or WebSocket?

•Different usage and timeline
•WebSocket
 •(+) TCP-like
 •(+) push data from the server to the browser
REST or WebSocket?

•Different usage and timeline
•WebSocket
 •(+) TCP-like
 •(+) push data from the server to the browser
 •(-) Limited support now, will likely expand
REST or WebSocket?

•Different usage and timeline
•WebSocket
 •(+) TCP-like
 •(+) push data from the server to the browser
 •(-) Limited support now, will likely expand
•REST
REST or WebSocket?

•Different usage and timeline
•WebSocket
 •(+) TCP-like
 •(+) push data from the server to the browser
 •(-) Limited support now, will likely expand
•REST
 •(+) Works everywhere now
REST or WebSocket?

•Different usage and timeline
•WebSocket
 •(+) TCP-like
 •(+) push data from the server to the browser
 •(-) Limited support now, will likely expand
•REST
 •(+) Works everywhere now
 •(-) No push messages in the browser
Conclusion
Conclusion


•Different ways to do messaging on the Web
Conclusion


•Different ways to do messaging on the Web
•Integrate with the whole Java / Java EE ecosystem
Conclusion


•Different ways to do messaging on the Web
•Integrate with the whole Java / Java EE ecosystem
•Embraces Web principles (REST)
Conclusion


•Different ways to do messaging on the Web
•Integrate with the whole Java / Java EE ecosystem
•Embraces Web principles (REST)
•Integration & interoperability
Conclusion


•Different ways to do messaging on the Web
•Integrate with the whole Java / Java EE ecosystem
•Embraces Web principles (REST)
•Integration & interoperability
•... Performance(?)
Demo Source



•http://github.com/jmesnil/hornetq/tree/judcon
Questions?
Danke Schön!

Más contenido relacionado

Destacado

Ayodeji j adejuyigbe IE Presentation to UN Secretary General
Ayodeji j adejuyigbe IE Presentation to UN Secretary GeneralAyodeji j adejuyigbe IE Presentation to UN Secretary General
Ayodeji j adejuyigbe IE Presentation to UN Secretary GeneralAYODEJI ADEJUYIGBE
 
Mikropengajaran 111211040517-phpapp02
Mikropengajaran 111211040517-phpapp02Mikropengajaran 111211040517-phpapp02
Mikropengajaran 111211040517-phpapp02Shahirah Sharifuddin
 
Km Tiedonhaun TyöKalut 09
Km Tiedonhaun TyöKalut 09Km Tiedonhaun TyöKalut 09
Km Tiedonhaun TyöKalut 09MariAaltonen
 
Km Tiedonhaku Ja Viittaustekniikka 09
Km Tiedonhaku Ja Viittaustekniikka 09Km Tiedonhaku Ja Viittaustekniikka 09
Km Tiedonhaku Ja Viittaustekniikka 09MariAaltonen
 
Boas Praticas de Testes, Bad Smell e Outros Macetes
Boas Praticas de Testes, Bad Smell e Outros MacetesBoas Praticas de Testes, Bad Smell e Outros Macetes
Boas Praticas de Testes, Bad Smell e Outros MacetesIsmael
 
ASAS FOTOGRAFI
ASAS FOTOGRAFIASAS FOTOGRAFI
ASAS FOTOGRAFIRAJA NADIA
 
8 passos para mudança de John Kotter
8 passos para mudança de John Kotter8 passos para mudança de John Kotter
8 passos para mudança de John KotterIsmael
 
Kerja berpasukan dan lain lain
Kerja berpasukan dan lain lainKerja berpasukan dan lain lain
Kerja berpasukan dan lain lainAqmar Ayub
 

Destacado (10)

Ayodeji j adejuyigbe IE Presentation to UN Secretary General
Ayodeji j adejuyigbe IE Presentation to UN Secretary GeneralAyodeji j adejuyigbe IE Presentation to UN Secretary General
Ayodeji j adejuyigbe IE Presentation to UN Secretary General
 
Mikropengajaran 111211040517-phpapp02
Mikropengajaran 111211040517-phpapp02Mikropengajaran 111211040517-phpapp02
Mikropengajaran 111211040517-phpapp02
 
Km Tiedonhaun TyöKalut 09
Km Tiedonhaun TyöKalut 09Km Tiedonhaun TyöKalut 09
Km Tiedonhaun TyöKalut 09
 
Km Tiedonhaku Ja Viittaustekniikka 09
Km Tiedonhaku Ja Viittaustekniikka 09Km Tiedonhaku Ja Viittaustekniikka 09
Km Tiedonhaku Ja Viittaustekniikka 09
 
Doosan#7
Doosan#7Doosan#7
Doosan#7
 
Boas Praticas de Testes, Bad Smell e Outros Macetes
Boas Praticas de Testes, Bad Smell e Outros MacetesBoas Praticas de Testes, Bad Smell e Outros Macetes
Boas Praticas de Testes, Bad Smell e Outros Macetes
 
Umashankar Adha
Umashankar AdhaUmashankar Adha
Umashankar Adha
 
ASAS FOTOGRAFI
ASAS FOTOGRAFIASAS FOTOGRAFI
ASAS FOTOGRAFI
 
8 passos para mudança de John Kotter
8 passos para mudança de John Kotter8 passos para mudança de John Kotter
8 passos para mudança de John Kotter
 
Kerja berpasukan dan lain lain
Kerja berpasukan dan lain lainKerja berpasukan dan lain lain
Kerja berpasukan dan lain lain
 

Similar a HornetQ & the Web - JUDCon Berlin 2010

Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010Gavin Hogan
 
Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010Gavin Hogan
 
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Erik Onnen
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]Ryan Cuprak
 
Data Pipelines with Apache Kafka
Data Pipelines with Apache KafkaData Pipelines with Apache Kafka
Data Pipelines with Apache KafkaBen Stopford
 
Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...
Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...
Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...HostedbyConfluent
 
The Future of Cross-Platform is Native
The Future of Cross-Platform is NativeThe Future of Cross-Platform is Native
The Future of Cross-Platform is NativeJustin Mancinelli
 
A detailed Tibco EMS presentation
A detailed Tibco EMS presentationA detailed Tibco EMS presentation
A detailed Tibco EMS presentationCblsolutions.com
 
From a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised LandFrom a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised LandRan Silberman
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqdevObjective
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqColdFusionConference
 
Distributed messaging with Apache Kafka
Distributed messaging with Apache KafkaDistributed messaging with Apache Kafka
Distributed messaging with Apache KafkaSaumitra Srivastav
 
Messaging with amqp and rabbitmq
Messaging with amqp and rabbitmqMessaging with amqp and rabbitmq
Messaging with amqp and rabbitmqSelasie Hanson
 
Connecting applicationswitha mq
Connecting applicationswitha mqConnecting applicationswitha mq
Connecting applicationswitha mqRob Davies
 
Introduction tojms
Introduction tojmsIntroduction tojms
Introduction tojmsMaya Swamy
 
From a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePersonFrom a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePersonLivePerson
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009Paolo Negri
 
Architectures with Windows Azure
Architectures with Windows AzureArchitectures with Windows Azure
Architectures with Windows AzureDamir Dobric
 

Similar a HornetQ & the Web - JUDCon Berlin 2010 (20)

Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010
 
Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010Hornet q and-the-web-jud-con-2010
Hornet q and-the-web-jud-con-2010
 
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
 
Data Pipelines with Apache Kafka
Data Pipelines with Apache KafkaData Pipelines with Apache Kafka
Data Pipelines with Apache Kafka
 
Spring integration
Spring integrationSpring integration
Spring integration
 
Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...
Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...
Fan-in Flames: Scaling Kafka to Millions of Producers With Ryanne Dolan | Cur...
 
The Future of Cross-Platform is Native
The Future of Cross-Platform is NativeThe Future of Cross-Platform is Native
The Future of Cross-Platform is Native
 
A detailed Tibco EMS presentation
A detailed Tibco EMS presentationA detailed Tibco EMS presentation
A detailed Tibco EMS presentation
 
From a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised LandFrom a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised Land
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
 
Distributed messaging with Apache Kafka
Distributed messaging with Apache KafkaDistributed messaging with Apache Kafka
Distributed messaging with Apache Kafka
 
Messaging with amqp and rabbitmq
Messaging with amqp and rabbitmqMessaging with amqp and rabbitmq
Messaging with amqp and rabbitmq
 
Connecting applicationswitha mq
Connecting applicationswitha mqConnecting applicationswitha mq
Connecting applicationswitha mq
 
Introduction tojms
Introduction tojmsIntroduction tojms
Introduction tojms
 
From a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePersonFrom a Kafkaesque Story to The Promised Land at LivePerson
From a Kafkaesque Story to The Promised Land at LivePerson
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009
 
Fabric8 mq
Fabric8 mqFabric8 mq
Fabric8 mq
 
Architectures with Windows Azure
Architectures with Windows AzureArchitectures with Windows Azure
Architectures with Windows Azure
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

HornetQ & the Web - JUDCon Berlin 2010

Notas del editor