SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Develop Real Time HTML5 Applications using
      WebSocket with Apache Camel & ActiveMQ

      Camel One
      16 of May - 2012
        th




    Charles Moulliard
    Sr. Principal Solution Architect
    Apache Committer

        Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.   A Progress Software Company
1
Speaker : Charles Moulliard

    • Engineer in Agronomy & Master in Zoology
      – 18 years of experience in IT world development
      – Specialized in new technologies Web & Integration
      – Project manager in Bank, Financial, Telco world
    • Solution Architect at FuseSource
    • Committer on projects : Apache ServiceMix, Apache
      Karaf (PMC), Apache Camel, Fuse Fabric

       Twitter : http://twitter.com/cmoulliard
       LinkedIn : http://www.linkedin.com/in/charlesmoulliard
       My blog : http://cmoulliard.blogspot.com
       Slideshare : http://www.slideshare.net/cmoulliard
2                              © 2012 FuseSource Corp. All rights reserved
Agenda

 Introduction
    • History & HTML5
    • Websocket revealed
 ActiveMQ
    • Stomp and WebSocket
 Camel
    • Camel-websocket
 Demo
 Conclusion

3                       © 2012 FuseSource Corp. All rights reserved
Agenda

 Introduction
    • History & HTML5
    • Websocket revealed
 ActiveMQ
    • Stomp and WebSocket
 Camel
    • Camel-websocket
 Demo
 Conclusion

4                       © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 History
    • Started with Java Applet
      and Shockwave player (199x)
    • Followed by Macromedia
      Shockwave, Adobe Flash,
      Microsoft Silverlight
    •Goal : Develop
      client-server application
      using HTTP/RMI protocol
5                    © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 Evolution : Animation  Design Rich
  Internet Applications (Intranet)
 Limitations about Technology based on
  Web 1.0 concepts
    • No push  require lot of HTTP requests
    • RMI protocol  blocked by Firewall
    • Exchanges mainly use XML - WebServices
    • Compatibility between plugin(s) / browser
    • Code should be signed (to access local
      resources)
6                      © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 Web 2.0 “Revolution”
    •              HTTPs requests

    •Due to volume of data (video,
     audio, text) exchanged
     between “social networks”
    • User becomes “actor” – “collaborating”

 New solutions have been imagined  Ajax
    technology (2005), JSON instead of XML , REST
7                     © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 JavaScript client uses (a)synchronous
  communication with server : XML, JSON
     Ajax Reverse, but not really PUSH




8                     © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 First Strategy Developed
 Cometd/Bayeux protocol
 Principe
    • Use a persistent or long-lasting HTTP
      connection with HTTP server
      (streaming / polling)
    • Events based to push data to the
      browser
    • Connection is keep alive till timeout




9                            © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 Drawbacks :
     • Browser (HTTP 1.x spec) only allows 2
       connections with HTTP server  1 connection
       will be kept alive for Cometd/Bayeux server
     • Any new event requests a new HTTP call
     • Bayeux communication protocol has not been
       standardized through IETF, W3C
     • Exchanges based on “Bayeux” message structure
       (and not XML, JSON, …) – more complex to
       handle
     • One Way communication (server  client)
10                      © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 2nd approach - WebSocket
 HTML5 (2009)
     • ~= html + css + js
     • Offline storage
     • RealTime/Communication
     • File/Hardware Access
     • CSS 3, Graphics/Multimedia
     • Supported by Tablet/Pc/Mobile
     • More info :
       http://slides.html5rocks.com/#landing-slide
11                      © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 Websocket revealed
     •Full-duplex single
      socket connection
     •HTTP request followed
      by WebSocket data
      Packets exchange
     •ws:// and wss:// protocol
     •Developed part of HTML5 initiative
     •Specification rfc-6455 (Dec-2011) managed
      by IETF Task Force
12                    © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 What the browser sends 


                                                                          Key which is base64 encoded
                                                                          and uses as handshake
                                                                          between client and server




                                                                Version of WebSocket used –
                                                                allow client and server to check if
                                                                they are compatible



13                © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 And what it receives




                                                                Response created by the server
                                                                (client key + GUI) signed SHA-1 and
                                                                encoded in base64




14                © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 Next Data frames are exchanged back and
  forth between client and server through
  TCP/IP connection




 Bytes or UTF-8 Text packets are supported
 Text is mainly used within JavaScript
15                © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 Sec-WebSocket-protocol
     • Application-level protocol layered over the WebSocket
       Protocol (chat, …)


 Sec-WebSocket-Extensions
     • Initially sent from the client to the server, and then
       subsequently sent from the server to the client,
     •  To agree on a set of protocol-level extensions to use for
       the duration of the connection



16                          © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Introduction

 Benefits
     • Use same ports as HTTP and
      HTTPS
     •Bandwidth reduction
     •No long polling process
     •No more unnecessary traffic
     •Standard based
     •Security managed though Web
      Server (SSL, Authentication)

17                   © 2012 FuseSource Corp. All rights reserved
Agenda

 Introduction
     • History & HTML5
     • Websocket revealed
 ActiveMQ
     • Stomp and WebSocket
 Camel
     • Camel-websocket
 Demo
 Conclusion

18                       © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - ActiveMQ

 Provide a websocket implementation using
  ws:// transport connector
 Use Jetty WebSocket v7.5
 Is available since ActiveMQ 5.6
 Stomp is the wire format

 More info :
  http://activemq.apache.org/websockets.html

19               © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - ActiveMQ

                       HTTP(S)
                   Request/Response

       Client                                   WebSocket                                    Stomp      ActiveMQ
     (Browser)                                  Connector                                   Converter   (Backend)
                        TCP
                     (WebSocket)
                                                                                           ActiveMQ




                 1. HTTP Request (Upgrade)

                      2. HTTP Response


                     3. Stomp Subscribe
                                                              4. Message received
                                                                   from Topic

                       5. Send WebSocket
                              Data




20                                           © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - ActiveMQ

 Server side
     • 1) Transport connector must be enable for websocket



                                                                           Add ws:// transport connector


     • 2) Topics/Queues will be used as channels to send (or
       receive messages)                          Nothing special …




21                           © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - ActiveMQ

 Client side
     • Need js client
      A) stomp.js : Author Jeff Mesnil
       – Code : https://github.com/jmesnil/stomp-websocket
       – Doc : http://www.jmesnil.net/stomp-websocket/doc/
      B) stomple : Author  Karl Krukow
       – Code : https://github.com/krukow/stomple




22                       © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - ActiveMQ

    2) Create a WebSocket connection with
     ActiveMQ using Stomp.js client
                                                                                           JQuery helps us to
                                                                                           display result in HTML
                                                                                           page

A. Create a client
to connect to the
server

                                                                                                   Destination : /topic/stockQuoteTopic
                                                                                                   url : ws://localhost:61614/stomp :




         C. Establish connection using                                                 C. Wait response …
         login, password




   23                                    © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - ActiveMQ

   • 3) Subscribe to the topic (= channel)
Subscribe to the topic and listen on
messages

                                                                                              Parse JSON messages




   • 4) When job is done  close connection
                                                                                     Close here




   24                                  © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - ActiveMQ

 Benefits
     •Acts as real time data feed provider (topic)
     •Infrastructure can be secured
       – Web Server level (SSL, Authentication)
       – ActiveMQ “security plugin”
     •By combining Scalability/High Availability
      features of ActiveMQ, feed are persisted,
      distributed


25                       © 2012 FuseSource Corp. All rights reserved
Agenda

 Introduction
     • History & HTML5
     • Websocket revealed
 ActiveMQ
     • Stomp and WebSocket
 Camel
     • Camel-websocket
 Demo
 Conclusion

26                       © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Camel

 Camel-websocket component - part of Camel
  2.10 (http://camel.apache.org/websocket.html )
 Use Jetty WebServer v7.5
 Can be used to produce or consume
 Allow to send packets to multiple clients
  (“sendToAll”) or to individual (=key)
 Should be combined with EIP patterns to
  aggregate/split/enrich data and/or other
  components (RSS, Atom, Twitter, JSon, …)

27                  © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Camel
                         HTTP(S)
                     Request/Response

       Client                                     WebSocket                                 Data            JMS
     (Browser)                                    Component                                Format         Component
                          TCP
                       (WebSocket)
                                                                                           Camel



                                                                                                             ActiveMQ
                                                                                                              (Topic)



                 1. HTTP Request (Upgrade)

                      2. HTTP Response


                    3. Connect to channel                                                           4. Message consumed
                                                                                                         From Topic
                                                            5. On Camel Exchange
                                                                   received

                       6. Send WebSocket
                              Data




28                                           © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps – Camel - Produce

 1) Create a Camel Route to produce
  websocket packets  Http Client




               Data consumed from a topic are send
               to all the WebSocket clients
               connected




29                  © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps – Camel - Consume

 1) or Create a Camel Route to consume -
  produce websocket packets

                                                                 WebSockets packets are received by
                                                                 the websocket:chat-room endpoint




                                 Packets send by client in the channel
                                 “chat-room” are resend to all the
                                 clients connected to the “chat-room”




30                © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Camel

 2) Client side - Will use WebSocket js script in
     combination with jquery, jquery-ui, … to
     communicate

                                                                      First. Create a WebSocket connection




                                       4 methods are available :
                                       -onopen
                                       -onmessage
                                       -onerror
                                       -onclose



31                      © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Camel

 2) Parse messages
                                                                Every websocket “message” is consumed here




                                          Message is parsed
                                          using JSON (text 
                                          Object)




                         Next we display the result in the HTML page




32                © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Camel

 2) Close connection
                                                                Close event can be used to stop
                                                                   communication with server




33                © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Camel

 Benefits Provided by Camel framework 
     • Camel acts as a mediation router between
      “feed” providers and “feed” consumers
     • Will facilitate “aggregation”, “enrichment”,
      “filtering” of the feeds receive before to
      distribute them
     • Will provide the components required to
      interconnect “platforms”
     • Camel + ActiveMQ + Fabric = Scalability, High
      Availability, Cloud of data Feed
34                       © 2012 FuseSource Corp. All rights reserved
Agenda

 Introduction
     • History & HTML5
     • Websocket revealed
 ActiveMQ
     • Stomp and WebSocket
 Camel
     • Camel-websocket
 Demo
 Conclusion

35                       © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Demo




     ActiveMQ – Stock
           Trader
          Demo 1


36               © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Demo




     Camel – Chat
        Room
       Demo 2

37              © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Demo

     Camel – News
        Feed
       Demo 3


                                                              Need help :
                                                              Send messages to
                                                               #camelone

38              © 2012 FuseSource Corp. All rights reserved
Agenda

 Introduction
     • History & HTML5
     • Websocket revealed
 ActiveMQ
     • Stomp and WebSocket
 Camel
     • Camel-websocket
 Demo
 Conclusion

39                       © 2012 FuseSource Corp. All rights reserved
Real Time HTML5 Apps - Conclusion

 ActiveMQ and Camel are ready
  for “Real Time HTML5
  Application Development”
 Provide best of the Fuse -
  Apache technology for
  integration (EIP and
  components)
 Will help you to drive your
  business (transport, tracking,…)
 Available for any device ….
  Tablet/iPhone/Android/Pc/Mac
40                     © 2012 FuseSource Corp. All rights reserved
Any Questions?

                                             Twitter : @cmoulliard

                                             More info :
                                              http://fusesource.com




  Demo code :
   https://github.com/FuseByExample/websocket-activemq-c


41                   © 2012 FuseSource Corp. All rights reserved

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSocketsGunnar Hillert
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIGert Vanthienen
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebPeter Lubbers
 
HTML5 WebSocket Introduction
HTML5 WebSocket IntroductionHTML5 WebSocket Introduction
HTML5 WebSocket IntroductionMarcelo Jabali
 
An Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAn Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAdrian Trenaman
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)Ericom Software
 
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)Peter Lubbers
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossugclkao
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixBruce Snyder
 
JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307Framgia Vietnam
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with javaJeongHun Byeon
 
Spring + WebSocket integration
Spring + WebSocket integrationSpring + WebSocket integration
Spring + WebSocket integrationOleksandr Semenov
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets PresentationVolodymyr Lavrynovych
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsMaayan Glikser
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!jfarcand
 

Was ist angesagt? (20)

Ws
WsWs
Ws
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
Intro to WebSockets
Intro to WebSocketsIntro to WebSockets
Intro to WebSockets
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBI
 
HTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the WebHTML5 WebSocket: The New Network Stack for the Web
HTML5 WebSocket: The New Network Stack for the Web
 
HTML5 WebSocket Introduction
HTML5 WebSocket IntroductionHTML5 WebSocket Introduction
HTML5 WebSocket Introduction
 
An Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAn Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESB
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
 
WebSocket protocol
WebSocket protocolWebSocket protocol
WebSocket protocol
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossug
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307JMS and ActiveMQ - VuNV 201307
JMS and ActiveMQ - VuNV 201307
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with java
 
Spring + WebSocket integration
Spring + WebSocket integrationSpring + WebSocket integration
Spring + WebSocket integration
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
 
WebSockets with Spring 4
WebSockets with Spring 4WebSockets with Spring 4
WebSockets with Spring 4
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSockets
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!
 

Ähnlich wie Camelone-2012 HTML5 WebSocket ActiveMQ/Camel

V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketbrent bucci
 
Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersBrian Huff
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTCGiacomo Vacca
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Securitychuckbt
 
Programming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and GrizzlyProgramming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and GrizzlyC2B2 Consulting
 
Dev con kolkata 2012 websockets
Dev con kolkata 2012   websocketsDev con kolkata 2012   websockets
Dev con kolkata 2012 websocketsSANKARSAN BOSE
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDoris Chen
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15streamdata.io
 
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01purans
 
WebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the FutureWebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the FutureFrank Greco
 
Websocket technology for XPages
Websocket technology for XPagesWebsocket technology for XPages
Websocket technology for XPagesCsaba Kiss
 
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015Pavel Bucek
 
Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Amit Naik
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityPeter Lubbers
 

Ähnlich wie Camelone-2012 HTML5 WebSocket ActiveMQ/Camel (20)

V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
 
Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud Developers
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
 
Programming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and GrizzlyProgramming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and Grizzly
 
WebRCT
WebRCTWebRCT
WebRCT
 
Dev con kolkata 2012 websockets
Dev con kolkata 2012   websocketsDev con kolkata 2012   websockets
Dev con kolkata 2012 websockets
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax Push
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15
 
Websocket
WebsocketWebsocket
Websocket
 
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
 
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerryjWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
 
WebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the FutureWebSocket Perspectives and Vision for the Future
WebSocket Perspectives and Vision for the Future
 
WebSockets - Boosting Web Communication - SDC 2011
WebSockets - Boosting Web Communication - SDC 2011WebSockets - Boosting Web Communication - SDC 2011
WebSockets - Boosting Web Communication - SDC 2011
 
Websocket technology for XPages
Websocket technology for XPagesWebsocket technology for XPages
Websocket technology for XPages
 
WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5
 
Web-Socket
Web-SocketWeb-Socket
Web-Socket
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and Connectivity
 

Mehr von Charles Moulliard

Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakCharles Moulliard
 
Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Charles Moulliard
 
Develop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backendDevelop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backendCharles Moulliard
 
Security enforcement of Microservices with API Management
Security enforcement of Microservices with API ManagementSecurity enforcement of Microservices with API Management
Security enforcement of Microservices with API ManagementCharles Moulliard
 
MicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelMicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelCharles Moulliard
 
Design a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST BackendDesign a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST BackendCharles Moulliard
 
Continuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on OpenshiftContinuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on OpenshiftCharles Moulliard
 
Development of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & HawtioDevelopment of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & HawtioCharles Moulliard
 
iPaas with Fuse Fabric Technology
iPaas with Fuse Fabric TechnologyiPaas with Fuse Fabric Technology
iPaas with Fuse Fabric TechnologyCharles Moulliard
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Charles Moulliard
 
Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012Charles Moulliard
 
Fusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliardFusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliardCharles Moulliard
 
Fusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardFusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardCharles Moulliard
 
Devoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemqDevoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemqCharles Moulliard
 
Be jug 090611_apacheservicemix
Be jug 090611_apacheservicemixBe jug 090611_apacheservicemix
Be jug 090611_apacheservicemixCharles Moulliard
 
Fuse source parisjug-10052011
Fuse source parisjug-10052011Fuse source parisjug-10052011
Fuse source parisjug-10052011Charles Moulliard
 
Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration Charles Moulliard
 

Mehr von Charles Moulliard (19)

Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & Keycloak
 
Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016
 
Develop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backendDevelop a Mobile Application coonected to a REST backend
Develop a Mobile Application coonected to a REST backend
 
Security enforcement of Microservices with API Management
Security enforcement of Microservices with API ManagementSecurity enforcement of Microservices with API Management
Security enforcement of Microservices with API Management
 
MicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache CamelMicroService and MicroContainer with Apache Camel
MicroService and MicroContainer with Apache Camel
 
Design a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST BackendDesign a Mobil Hybrid Application connected to a REST Backend
Design a Mobil Hybrid Application connected to a REST Backend
 
Fuse technology-2015
Fuse technology-2015Fuse technology-2015
Fuse technology-2015
 
Continuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on OpenshiftContinuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on Openshift
 
Development of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & HawtioDevelopment of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & Hawtio
 
iPaas with Fuse Fabric Technology
iPaas with Fuse Fabric TechnologyiPaas with Fuse Fabric Technology
iPaas with Fuse Fabric Technology
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013
 
Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012
 
Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012
 
Fusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliardFusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliard
 
Fusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardFusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliard
 
Devoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemqDevoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemq
 
Be jug 090611_apacheservicemix
Be jug 090611_apacheservicemixBe jug 090611_apacheservicemix
Be jug 090611_apacheservicemix
 
Fuse source parisjug-10052011
Fuse source parisjug-10052011Fuse source parisjug-10052011
Fuse source parisjug-10052011
 
Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration
 

Kürzlich hochgeladen

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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
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
 
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
 
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
 

Kürzlich hochgeladen (20)

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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
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
 
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
 
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
 

Camelone-2012 HTML5 WebSocket ActiveMQ/Camel

  • 1. Develop Real Time HTML5 Applications using WebSocket with Apache Camel & ActiveMQ Camel One 16 of May - 2012 th Charles Moulliard Sr. Principal Solution Architect Apache Committer Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. A Progress Software Company 1
  • 2. Speaker : Charles Moulliard • Engineer in Agronomy & Master in Zoology – 18 years of experience in IT world development – Specialized in new technologies Web & Integration – Project manager in Bank, Financial, Telco world • Solution Architect at FuseSource • Committer on projects : Apache ServiceMix, Apache Karaf (PMC), Apache Camel, Fuse Fabric Twitter : http://twitter.com/cmoulliard LinkedIn : http://www.linkedin.com/in/charlesmoulliard My blog : http://cmoulliard.blogspot.com Slideshare : http://www.slideshare.net/cmoulliard 2 © 2012 FuseSource Corp. All rights reserved
  • 3. Agenda  Introduction • History & HTML5 • Websocket revealed  ActiveMQ • Stomp and WebSocket  Camel • Camel-websocket  Demo  Conclusion 3 © 2012 FuseSource Corp. All rights reserved
  • 4. Agenda  Introduction • History & HTML5 • Websocket revealed  ActiveMQ • Stomp and WebSocket  Camel • Camel-websocket  Demo  Conclusion 4 © 2012 FuseSource Corp. All rights reserved
  • 5. Real Time HTML5 Apps - Introduction  History • Started with Java Applet and Shockwave player (199x) • Followed by Macromedia Shockwave, Adobe Flash, Microsoft Silverlight •Goal : Develop client-server application using HTTP/RMI protocol 5 © 2012 FuseSource Corp. All rights reserved
  • 6. Real Time HTML5 Apps - Introduction  Evolution : Animation  Design Rich Internet Applications (Intranet)  Limitations about Technology based on Web 1.0 concepts • No push  require lot of HTTP requests • RMI protocol  blocked by Firewall • Exchanges mainly use XML - WebServices • Compatibility between plugin(s) / browser • Code should be signed (to access local resources) 6 © 2012 FuseSource Corp. All rights reserved
  • 7. Real Time HTML5 Apps - Introduction  Web 2.0 “Revolution” • HTTPs requests •Due to volume of data (video, audio, text) exchanged between “social networks” • User becomes “actor” – “collaborating”  New solutions have been imagined  Ajax technology (2005), JSON instead of XML , REST 7 © 2012 FuseSource Corp. All rights reserved
  • 8. Real Time HTML5 Apps - Introduction  JavaScript client uses (a)synchronous communication with server : XML, JSON  Ajax Reverse, but not really PUSH 8 © 2012 FuseSource Corp. All rights reserved
  • 9. Real Time HTML5 Apps - Introduction  First Strategy Developed  Cometd/Bayeux protocol  Principe • Use a persistent or long-lasting HTTP connection with HTTP server (streaming / polling) • Events based to push data to the browser • Connection is keep alive till timeout 9 © 2012 FuseSource Corp. All rights reserved
  • 10. Real Time HTML5 Apps - Introduction  Drawbacks : • Browser (HTTP 1.x spec) only allows 2 connections with HTTP server  1 connection will be kept alive for Cometd/Bayeux server • Any new event requests a new HTTP call • Bayeux communication protocol has not been standardized through IETF, W3C • Exchanges based on “Bayeux” message structure (and not XML, JSON, …) – more complex to handle • One Way communication (server  client) 10 © 2012 FuseSource Corp. All rights reserved
  • 11. Real Time HTML5 Apps - Introduction  2nd approach - WebSocket  HTML5 (2009) • ~= html + css + js • Offline storage • RealTime/Communication • File/Hardware Access • CSS 3, Graphics/Multimedia • Supported by Tablet/Pc/Mobile • More info : http://slides.html5rocks.com/#landing-slide 11 © 2012 FuseSource Corp. All rights reserved
  • 12. Real Time HTML5 Apps - Introduction  Websocket revealed •Full-duplex single socket connection •HTTP request followed by WebSocket data Packets exchange •ws:// and wss:// protocol •Developed part of HTML5 initiative •Specification rfc-6455 (Dec-2011) managed by IETF Task Force 12 © 2012 FuseSource Corp. All rights reserved
  • 13. Real Time HTML5 Apps - Introduction  What the browser sends  Key which is base64 encoded and uses as handshake between client and server Version of WebSocket used – allow client and server to check if they are compatible 13 © 2012 FuseSource Corp. All rights reserved
  • 14. Real Time HTML5 Apps - Introduction  And what it receives Response created by the server (client key + GUI) signed SHA-1 and encoded in base64 14 © 2012 FuseSource Corp. All rights reserved
  • 15. Real Time HTML5 Apps - Introduction  Next Data frames are exchanged back and forth between client and server through TCP/IP connection  Bytes or UTF-8 Text packets are supported  Text is mainly used within JavaScript 15 © 2012 FuseSource Corp. All rights reserved
  • 16. Real Time HTML5 Apps - Introduction  Sec-WebSocket-protocol • Application-level protocol layered over the WebSocket Protocol (chat, …)  Sec-WebSocket-Extensions • Initially sent from the client to the server, and then subsequently sent from the server to the client, •  To agree on a set of protocol-level extensions to use for the duration of the connection 16 © 2012 FuseSource Corp. All rights reserved
  • 17. Real Time HTML5 Apps - Introduction  Benefits • Use same ports as HTTP and HTTPS •Bandwidth reduction •No long polling process •No more unnecessary traffic •Standard based •Security managed though Web Server (SSL, Authentication) 17 © 2012 FuseSource Corp. All rights reserved
  • 18. Agenda  Introduction • History & HTML5 • Websocket revealed  ActiveMQ • Stomp and WebSocket  Camel • Camel-websocket  Demo  Conclusion 18 © 2012 FuseSource Corp. All rights reserved
  • 19. Real Time HTML5 Apps - ActiveMQ  Provide a websocket implementation using ws:// transport connector  Use Jetty WebSocket v7.5  Is available since ActiveMQ 5.6  Stomp is the wire format  More info : http://activemq.apache.org/websockets.html 19 © 2012 FuseSource Corp. All rights reserved
  • 20. Real Time HTML5 Apps - ActiveMQ HTTP(S) Request/Response Client WebSocket Stomp ActiveMQ (Browser) Connector Converter (Backend) TCP (WebSocket) ActiveMQ 1. HTTP Request (Upgrade) 2. HTTP Response 3. Stomp Subscribe 4. Message received from Topic 5. Send WebSocket Data 20 © 2012 FuseSource Corp. All rights reserved
  • 21. Real Time HTML5 Apps - ActiveMQ  Server side • 1) Transport connector must be enable for websocket Add ws:// transport connector • 2) Topics/Queues will be used as channels to send (or receive messages) Nothing special … 21 © 2012 FuseSource Corp. All rights reserved
  • 22. Real Time HTML5 Apps - ActiveMQ  Client side • Need js client A) stomp.js : Author Jeff Mesnil – Code : https://github.com/jmesnil/stomp-websocket – Doc : http://www.jmesnil.net/stomp-websocket/doc/ B) stomple : Author  Karl Krukow – Code : https://github.com/krukow/stomple 22 © 2012 FuseSource Corp. All rights reserved
  • 23. Real Time HTML5 Apps - ActiveMQ  2) Create a WebSocket connection with ActiveMQ using Stomp.js client JQuery helps us to display result in HTML page A. Create a client to connect to the server Destination : /topic/stockQuoteTopic url : ws://localhost:61614/stomp : C. Establish connection using C. Wait response … login, password 23 © 2012 FuseSource Corp. All rights reserved
  • 24. Real Time HTML5 Apps - ActiveMQ • 3) Subscribe to the topic (= channel) Subscribe to the topic and listen on messages Parse JSON messages • 4) When job is done  close connection Close here 24 © 2012 FuseSource Corp. All rights reserved
  • 25. Real Time HTML5 Apps - ActiveMQ  Benefits •Acts as real time data feed provider (topic) •Infrastructure can be secured – Web Server level (SSL, Authentication) – ActiveMQ “security plugin” •By combining Scalability/High Availability features of ActiveMQ, feed are persisted, distributed 25 © 2012 FuseSource Corp. All rights reserved
  • 26. Agenda  Introduction • History & HTML5 • Websocket revealed  ActiveMQ • Stomp and WebSocket  Camel • Camel-websocket  Demo  Conclusion 26 © 2012 FuseSource Corp. All rights reserved
  • 27. Real Time HTML5 Apps - Camel  Camel-websocket component - part of Camel 2.10 (http://camel.apache.org/websocket.html )  Use Jetty WebServer v7.5  Can be used to produce or consume  Allow to send packets to multiple clients (“sendToAll”) or to individual (=key)  Should be combined with EIP patterns to aggregate/split/enrich data and/or other components (RSS, Atom, Twitter, JSon, …) 27 © 2012 FuseSource Corp. All rights reserved
  • 28. Real Time HTML5 Apps - Camel HTTP(S) Request/Response Client WebSocket Data JMS (Browser) Component Format Component TCP (WebSocket) Camel ActiveMQ (Topic) 1. HTTP Request (Upgrade) 2. HTTP Response 3. Connect to channel 4. Message consumed From Topic 5. On Camel Exchange received 6. Send WebSocket Data 28 © 2012 FuseSource Corp. All rights reserved
  • 29. Real Time HTML5 Apps – Camel - Produce  1) Create a Camel Route to produce websocket packets  Http Client Data consumed from a topic are send to all the WebSocket clients connected 29 © 2012 FuseSource Corp. All rights reserved
  • 30. Real Time HTML5 Apps – Camel - Consume  1) or Create a Camel Route to consume - produce websocket packets WebSockets packets are received by the websocket:chat-room endpoint Packets send by client in the channel “chat-room” are resend to all the clients connected to the “chat-room” 30 © 2012 FuseSource Corp. All rights reserved
  • 31. Real Time HTML5 Apps - Camel  2) Client side - Will use WebSocket js script in combination with jquery, jquery-ui, … to communicate First. Create a WebSocket connection 4 methods are available : -onopen -onmessage -onerror -onclose 31 © 2012 FuseSource Corp. All rights reserved
  • 32. Real Time HTML5 Apps - Camel  2) Parse messages Every websocket “message” is consumed here Message is parsed using JSON (text  Object) Next we display the result in the HTML page 32 © 2012 FuseSource Corp. All rights reserved
  • 33. Real Time HTML5 Apps - Camel  2) Close connection Close event can be used to stop communication with server 33 © 2012 FuseSource Corp. All rights reserved
  • 34. Real Time HTML5 Apps - Camel  Benefits Provided by Camel framework  • Camel acts as a mediation router between “feed” providers and “feed” consumers • Will facilitate “aggregation”, “enrichment”, “filtering” of the feeds receive before to distribute them • Will provide the components required to interconnect “platforms” • Camel + ActiveMQ + Fabric = Scalability, High Availability, Cloud of data Feed 34 © 2012 FuseSource Corp. All rights reserved
  • 35. Agenda  Introduction • History & HTML5 • Websocket revealed  ActiveMQ • Stomp and WebSocket  Camel • Camel-websocket  Demo  Conclusion 35 © 2012 FuseSource Corp. All rights reserved
  • 36. Real Time HTML5 Apps - Demo ActiveMQ – Stock Trader Demo 1 36 © 2012 FuseSource Corp. All rights reserved
  • 37. Real Time HTML5 Apps - Demo Camel – Chat Room Demo 2 37 © 2012 FuseSource Corp. All rights reserved
  • 38. Real Time HTML5 Apps - Demo Camel – News Feed Demo 3 Need help : Send messages to #camelone 38 © 2012 FuseSource Corp. All rights reserved
  • 39. Agenda  Introduction • History & HTML5 • Websocket revealed  ActiveMQ • Stomp and WebSocket  Camel • Camel-websocket  Demo  Conclusion 39 © 2012 FuseSource Corp. All rights reserved
  • 40. Real Time HTML5 Apps - Conclusion  ActiveMQ and Camel are ready for “Real Time HTML5 Application Development”  Provide best of the Fuse - Apache technology for integration (EIP and components)  Will help you to drive your business (transport, tracking,…)  Available for any device …. Tablet/iPhone/Android/Pc/Mac 40 © 2012 FuseSource Corp. All rights reserved
  • 41. Any Questions?  Twitter : @cmoulliard  More info : http://fusesource.com  Demo code : https://github.com/FuseByExample/websocket-activemq-c 41 © 2012 FuseSource Corp. All rights reserved