SlideShare a Scribd company logo
1 of 43
High Performance Messaging
for
Web-based Trading Systems
Frank Greco - @frankgreco
 Director of Technology, Kaazing
Watch the video with slide
                         synchronization on InfoQ.com!
                      http://www.infoq.com/presentations
                             /messaging-web-trading

       InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
  Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Presented at QCon London
                       www.qconlondon.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
 - practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Outline

        §    Background
        §    Trading Systems and the Web
        §    Requirements
        §    Web Messaging for Trading Apps
        §    Layered Approach to Web Protocols
        §    New Requirements
        §    The Web beyond the Browser




© 2013 Kaazing Corporation
Background

        §    Financial Services – Capital Markets
        §    Desktop trading systems – Swing/Java/TIBCO, et al
        §    Customer use cases – FX, Commodity desks


                             §    Director of Technology @ Kaazing
                             §    Chairman NYJavaSIG (javasig.com)
                             §    Largest JUG in North America
                                    7,000+ members
                             §    frank.greco@kaazing.com, @frankgreco



© 2013 Kaazing Corporation
Web Trading Systems




                             FX Trader Application – front office
                             demo.kaazing.com/forex




© 2013 Kaazing Corporation
What is a Web Trading System

    §    Trading System – A set of rules governing buying/selling
    §    An application that expedites a trading system
    §    Modern Web Trading requirements
          -    HTML5 – no more plugins
          -    UI/UX – Sencha/extJS, GWT, jQuery, GPU acceleration, etc
          -    Usable application cache
          -    Fast, reliable, secure
          -    Minimal impact to back-end services
          -    Works with pub/sub brokers and data feeds
          -    High message rate, small payload – equity ticks, watchlist,
               currency pairs, etc.

© 2013 Kaazing Corporation
Everything sounds do-able, except…

        §    Designed for document transfer – HTTP
              -    Short-lived Request / Response interaction
        §    Bidirectional, but half-duplex
              -    Traffic flows in only one direction at a time
        §    Stateless
              -    Large amounts of metadata resent for each request


              Web was not designed for “real-time”,
                   event-based services…

© 2013 Kaazing Corporation
Some things age well…




                             HTTP




                                TCP




© 2013 Kaazing Corporation
…and some things don’t



                         Oldies Hits - AJAX and the Comet Pollers - 2006




© 2013 Kaazing Corporation
High-Level Trading Systems Architecture

iOS/Android



                                                                              Pricing Feeds
                                         Authentication   Authorization
                   Mobile
          Browser/Native Client

                                                   Make
                                  Net                me               Msg     News/Alerts
                                                    Web              Broker
                                                  friendly
                    Browser
                                                                 JMS/AMQP
                                                                   etc…
                                                                               Trade Exec

                                        What everyone
                                           does…
                      Desktop
                     Java/.NET
                                                                                 Reports



 © 2013 Kaazing Corporation
High-Level Trading Systems Architecture

iOS/Android



                                                                               Pricing Feeds
                                          Authentication   Authorization
                   Mobile
          Browser/Native Client

                                                    Make
                                  Net                 me               Msg     News/Alerts
                                                     Web              Broker
                                                   friendly
                    Browser
                                                                  JMS/AMQP
                                                                    etc…
                                                                                Trade Exec

                                          Developers want a
                                        secure version of this
                      Desktop            architecture so they
                     Java/.NET
                                         can focus on the app                     Reports



 © 2013 Kaazing Corporation
Real-time Client/Server Architecture

 Instead, we try this traditional solution




             Trading App                                                            Broker

                                          Just have to open
                                            some ports…


             Merely deploy Java/.NET on                      Only need to traverse several
                      client…                               proxies between the endpoints…


                                          Easy, right?...



© 2013 Kaazing Corporation
Middleware for the Middleware
 Or we try to proxy things over the web




                                                     ticker plant




                                          Scalability	
  	
  Issues…	
  
 Protocol	
  mismatches…	
  
 Inefficient…	
                             Latency	
  Issues…	
  
© 2013 Kaazing Corporation
Things aren’t looking too good…




© 2013 Kaazing Corporation
Welcome HTML5 (aka The New Web)!

       §    Users are Demanding more from Apps
       §    UI/UX Requirements are more sophisticated
       §    API Explosion
       §    Browser Enhancements
       §    Web no longer just about Documents but the existing
             infrastructure reflects this legacy



The New Web is a Foundation for Enterprise-grade Applications


                                                                   14
© 2013 Kaazing Corporation
WebSocket

   •    “Real-Time”, bi-directional connectivity
   •    IETF Protocol - RFC 6455 – Dec 2011
   •    W3C API
   •    Easily add event-based (trading) data to web apps
   •    Avoids polling
   •    Avoids HTTP meta-data overhead
   •    Shares port with HTTP (80/443)
   •    Peer protocol to HTTP (both use TCP)
   •    Most Important API in HTML5
        •     Facilitates other protocols
        •     Puts the web in a better place…



© 2013 Kaazing Corporation
WebSocket Standards

    §    W3C API – Candidate Recommendation
          -    http://www.w3.org/TR/websockets/
    §    IETF Formal Protocol (RFC 6455)
          -    Event-driven JavaScript API
          -    Full-duplex communication protocol
    §    Integrates HTTP addressing
          -    ws://yourcompany.com/collaboration_svc
          -    wss://anothercompany.com/marketdata_svc

    §  Traverses firewalls, proxies, routers securely
    §  Text and Binary

    §  Leverages Cross-Origin Resource Sharing (CORS)


© 2013 Kaazing Corporation
The WebSocket Handshake




© 2013 Kaazing Corporation
For Real-Time, Event-based Web Communication…


                   Legacy HTTP vs WebSocket




     Seems like a no-brainer for trading apps…
                                                 18
© 2013 Kaazing Corporation
Java API for WebSocket - JSR 356
     §     Creation of WebSocket Java components to
            handle bi-directional WebSocket conversations
     §     Handling WebSocket events
     §     Creation and consumption of WebSocket text and
            binary messages
     §     Allows for WebSocket protocols and content
            models for an application
     §     Configuration and management of WebSocket
            sessions, like timeouts, retries, cookies,
            connection pooling
     §     Specification of how WebSocket application will
            work within the Java EE security model!
     §     Official Java SE WebSocket API in the works…

© 2013 Kaazing Corporation
Why do I Care?
                              What does this
                             really have to do
                                with high-
                               performance
                                messaging?




© 2013 Kaazing Corporation
Legacy Web
                                        Half Duplex - HTTP                      Full duplex




                                             Web

                             Browser
                                                                  Web Tier Middleware Msg Broker



             Live Web

                                       Full duplex - WebSocket           Full duplex



                                               Web

                                                                 WebSocket        Msg Broker
                                                                  Server
© 2013 Kaazing Corporation
Scalability – more traders, more services

                   Complexity




                                                                         More Traders


                                                                       More Services

                                                                          More…More…

                                                                        Growth

              Greco’s Law!
                Scalability = Growth / Complexity        Simple things scale…

                                                                                  22
© 2013 Kaazing Corporation                          22
HTML5 WebSocket API




© 2013 Kaazing Corporation
HTML5 WebSocket API




      But…
         Dealing with WebSocket is like dealing with TCP.

         It’s a streams-based model. You need to understand how
         to handle streams-based data over the wire.

         So how do I do publish/subscribe for my trading system?
© 2013 Kaazing Corporation
What is Missing?

         Where is the Application-level Protocol?

         •  Who handles retries?
         •  How do we handle publish/subscribe semantics?
         •  How do we handle market data?
         •  Is guaranteed delivery possible (trades)?
         •  What if the client is not active?
         •  How do we handle [fill in with favorite semantics]
         •  What about partials?
         •  Who’s responsible for entitlements? How do I
            manage that?
         •  etc…


© 2013 Kaazing Corporation
But wait… Protocol Layering is Possible!

Whoa…	
  Its	
  just	
  like	
  TCP!	
  	
  	
  Huzzah!	
  
                                          Browser and Native Applications

                             JMS   XMPP     AMQP       B2B        FTP    VNC   mktdata   etc


                                                    WebSocket

                                                            TCP



                                                        Internet



                                                WebSocket          WebSocket
                                                 Gateway            Gateway




© 2013 Kaazing Corporation
Anything Else Missing?
        Other Considerations…
        •       Need to handle multiple WS versions
        •       Need to handle multiple (and legacy) browser versions
        •       Can’t have business logic in the DMZ
        •       Have to work in multiple DMZs
        •       AuthN/AuthZ has to work multiple times
        •       High-availability topology
        •       Concerns about open ports with back-end service
        •       Services architecture needs to be consistent
        •       Native, HTML5 and hybrid environments
        •       Integrate easily with non-messaging services
        •       XaaS integration – the Web beyond the browser
        •       Bandwidth management
        •       etc… All things you need for a real enterprise app
© 2013 Kaazing Corporation
Publish/Subscribe over the Web for Trading Systems


                               Java Message Service (JMS)
                                         over
                                      WebSocket

                                   A 60-second Tutorial




                             In case you haven’t heard of JMS…


© 2013 Kaazing Corporation
Java Message Service (JMS)

   •    Java EE Message Oriented Middleware
   •    JMS 1.0 2001, JMS 1.1 2002, JMS 2.0 (Feb 26, 2013)
   •    Asynchronous Messaging vs. RPC
   •    Loosely coupled vs. Tightly coupled
   •    Pub/Sub, Topics, Queues
   •    Transactions, Reliable




© 2013 Kaazing Corporation
Basic Inside-the-Firewall JMS

         conn = createConnection();
         sess = conn.createSession();
         topic = jndiContext.lookup(topic);
         pub = sess.createProducer(topic);

         pub.send(“hey Frank”);


                                              conn = createConnection();
                                                conn = createConnection();
                                              sess = conn.createSession();
                                                  conn conn.createSession();
                                                        = createConnection();
                                              topic = = = conn.createSession();
                                                sess jndiContext.lookup(topic);
                                                  sess jndiContext.lookup(topic);
                                              sub = = = jndiContext.lookup(topic);
                                                topic sess.createConsumer(topic);
                                                  topic
                                                sub = sess.createConsumer(topic);
                                              sub.setMessageListener(this);
                                                  sub = sess.createConsumer(topic);
                                                sub.setMessageListener(this);
                                              … sub.setMessageListener(this);
                                                …
                                              public void onMessage(Message m) {
                                                  …
                                                public voidm.getText();
                                                         = onMessage(Message m) {
                                                String s void onMessage(Message m) {
                                                  public s = m.getText();
             msg                                  String
                                                … do stuff… m.getText();
                                                    String s =
                                                  … do stuff…
            broker                            }
                                                } … do stuff…
                                                  }


© 2013 Kaazing Corporation
Now… JMS API for JavaScript

 1.          Create connection from ConnectionFactory
              see tutorial.kaazing.com

 2.          Create session
 3.          Create topic or queue
 4.          Create producer
 5.          Create consumer
 6.          Create message listeners (function to handle messages)


2    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
3    var myTopic = session.createTopic("/topic/myTopic");
4    topicProducer = session.createProducer(myTopic);
5    topicConsumer = session.createConsumer(myTopic);
6    topicConsumer.setMessageListener(handleTopicMessage);

© 2013 Kaazing Corporation
JMS API for JavaScript

 7.          Send messages
    var doSend = function(message) {
        message.setStringProperty(MESSAGE_PROPERTIES.userId, userId);
        topicProducer.send(null, message, DeliveryMode.NON_PERSISTENT, 3, 1, function()
            sendFromQueue();
        });
    };




 8.          Process messages: the message listener
             function: handleTopicMessage()
    var handleTopicMessage = function(message) {
        if (message.getStringProperty(MESSAGE_PROPERTIES.userId) != userId) {
            $("#slider").val(message.getText());
            $("#pic").width(message.getText());
        }
    };


© 2013 Kaazing Corporation
WebSocket Projects, OSS, Vendors

        •       Kaazing
        •       Node.js/socket.io
        •       ActiveMQ
        •       Tomcat
        •       Jetty
        •       Oracle Glassfish
        •       Java EE
        •       Play Framework
        •       Rabbit MQ
        •       JBoss
        •       IIS/ASP .NET 4.5
        •       PHP, Objective-C, Ruby, Python, C/C++, JVM-langs…
        •       Many more…

© 2013 Kaazing Corporation
Futures



               What’s next for Trading Systems and the Web?




                                                          34
© 2013 Kaazing Corporation
New Computing Model




                             Clouds




                                      35
© 2013 Kaazing Corporation
New Computing Model

                                                                   Storage        Regulatory
                                               Docs                                                    hypothetical
                             Email
                                       Cloud                            Cloud      Clearance




                                            websocket
                                                                   websocket          Collaboration

                                                                                  Cloud
                                                                    websocket
                                          websocket
                                                                                          Wealth Management
                                                                     websocket

                                                  Notifications
                                     Enterprise
            Transactions
                                                                                 Cloud       FX
                                Cloud          Cloud   Sentiment                           Analytics
   Risk                                                 Analysis
Management
                                                                                                            36
© 2013 Kaazing Corporation
Inter-Cloud Connectivity or XaaS
                                                                                  Clearance as
 Compliance                                                                        a Service
as a Service                          External Cloud
                                             Service Bus


                                                                                                       websocket
                                   service         service         service



                                                             Risk Management
                              Regulatory                        as a Service                          iPaaS
                             Auditing as a
                               Service
                                                                                                         websocket


     Internet Service Bus
                                                                               Enterprise
                                                                             Enterprise Service Bus



                                                       service       service            service




                                                                                                                     37
© 2013 Kaazing Corporation
Event-based XaaS – Everything as a Service in Real-Time

                                                             Integration as a Service
                Monitoring as a Service
                                                                    Governance as a Service
                                     Identity as a Service
                                                                             Testing as a
                   WAN Optimization as a Service
                                                         Risk Analytics        Service
                                                          as a Service
                Data Center as a Service                                   Windows Desktop
                                                 Enterprise Messaging        as a Service
                                                     as a Service
                  CDN as a Service                                         Network as a Service
                      Sentiment Analysis
                          as a Service                 Trade Clearance as a
                                                             Service
                               Database as a Service             Notification as a Service
                 Security as a Service            Backup             Analytics as a Service
                                                as a Service
                             EAI as a Service                              Telephony as a
                                                    Auditing as a             Service
                                                      Service
                                                                                              38
© 2013 Kaazing Corporation
Global Distribution – Next Generation CDN




© 2013 Kaazing Corporation
Questions?

                       frank.greco@kaazing.com




© 2013 Kaazing Corporation
Enterprise-Quality Features – WebSocket++

                                  Extends Browser as                                      24x7 Global
          IETF RFC                full enterprise client        Full JMS API for            Support
         Compliance
                                                               JavaScript, .NET,
     No business logic in                                     Flash, iOS, Android
                                                                                     Can Connect to
      Gateway - can be                                                (soon)
                                                                                     any TCP or UDP
  installed securely in DMZ                             Granular Client                data source
                                                      Timeouts for mobile
                             JMS Topics, Queues,
                                                        to detect offline        Emulation when
                              Durables, Acks for
                                                                               intermediaries block
                              Guaranteed msgs
                                                           iOS-APNS &               native WS
                                                           Android/GCM
       JMS Edition Works with any                           Integration
      JMS provider - no broker lock-in                                    AuthN/AuthZ       Bandwidth
                                                       Kerberos             and SSO          Control
                   Secure Services – can               over WS             integration
                   close all inbound ports
                                                No Server-Side API              Emulates WebSocket
             End-to-End                       for messaging needed                 protocol for old
        encrypted messages                     for legacy integration           browsers w/ no polling
         for multiple DMZs
© 2013 Kaazing Corporation

More Related Content

Viewers also liked

20081023 Internet of Services at eChallenges 2008 conference
20081023 Internet of Services at eChallenges 2008 conference20081023 Internet of Services at eChallenges 2008 conference
20081023 Internet of Services at eChallenges 2008 conferenceArian Zwegers
 
Trustleap - Mathematically-Proven Unbreakable Security
Trustleap - Mathematically-Proven Unbreakable SecurityTrustleap - Mathematically-Proven Unbreakable Security
Trustleap - Mathematically-Proven Unbreakable SecurityTWD Industries AG
 
Rabbit mq簡介(上)
Rabbit mq簡介(上)Rabbit mq簡介(上)
Rabbit mq簡介(上)共和 薛
 
Intro to High Performance Computing in the AWS Cloud
Intro to High Performance Computing in the AWS CloudIntro to High Performance Computing in the AWS Cloud
Intro to High Performance Computing in the AWS CloudAmazon Web Services
 
Sungard Global trading Presentation
Sungard Global trading PresentationSungard Global trading Presentation
Sungard Global trading Presentationahemeury
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQIntroduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQDmitriy Samovskiy
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyApcera
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingApcera
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesApcera
 
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)Amazon Web Services
 

Viewers also liked (11)

20081023 Internet of Services at eChallenges 2008 conference
20081023 Internet of Services at eChallenges 2008 conference20081023 Internet of Services at eChallenges 2008 conference
20081023 Internet of Services at eChallenges 2008 conference
 
Trustleap - Mathematically-Proven Unbreakable Security
Trustleap - Mathematically-Proven Unbreakable SecurityTrustleap - Mathematically-Proven Unbreakable Security
Trustleap - Mathematically-Proven Unbreakable Security
 
Rabbit mq簡介(上)
Rabbit mq簡介(上)Rabbit mq簡介(上)
Rabbit mq簡介(上)
 
Intro to High Performance Computing in the AWS Cloud
Intro to High Performance Computing in the AWS CloudIntro to High Performance Computing in the AWS Cloud
Intro to High Performance Computing in the AWS Cloud
 
Sungard Global trading Presentation
Sungard Global trading PresentationSungard Global trading Presentation
Sungard Global trading Presentation
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQIntroduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with Messaging
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices
 
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
AWS re:Invent 2016: High Performance Cinematic Production in the Cloud (MAE304)
 
IBM MQ vs Apache ActiveMQ
IBM MQ vs Apache ActiveMQIBM MQ vs Apache ActiveMQ
IBM MQ vs Apache ActiveMQ
 

More from C4Media

Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoStreaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoC4Media
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileC4Media
 
Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020C4Media
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No KeeperC4Media
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like OwnersC4Media
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaC4Media
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideC4Media
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 

More from C4Media (20)

Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoStreaming a Million Likes/Second: Real-Time Interactions on Live Video
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
 
Next Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy MobileNext Generation Client APIs in Envoy Mobile
Next Generation Client APIs in Envoy Mobile
 
Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020Software Teams and Teamwork Trends Report Q1 2020
Software Teams and Teamwork Trends Report Q1 2020
 
Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No Keeper
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like Owners
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 

Recently uploaded

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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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...
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

High Performance Messaging for Web-Based Trading Systems

  • 1. High Performance Messaging for Web-based Trading Systems Frank Greco - @frankgreco Director of Technology, Kaazing
  • 2. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /messaging-web-trading InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month
  • 3. Presented at QCon London www.qconlondon.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  • 4. Outline §  Background §  Trading Systems and the Web §  Requirements §  Web Messaging for Trading Apps §  Layered Approach to Web Protocols §  New Requirements §  The Web beyond the Browser © 2013 Kaazing Corporation
  • 5. Background §  Financial Services – Capital Markets §  Desktop trading systems – Swing/Java/TIBCO, et al §  Customer use cases – FX, Commodity desks §  Director of Technology @ Kaazing §  Chairman NYJavaSIG (javasig.com) §  Largest JUG in North America 7,000+ members §  frank.greco@kaazing.com, @frankgreco © 2013 Kaazing Corporation
  • 6. Web Trading Systems FX Trader Application – front office demo.kaazing.com/forex © 2013 Kaazing Corporation
  • 7. What is a Web Trading System §  Trading System – A set of rules governing buying/selling §  An application that expedites a trading system §  Modern Web Trading requirements -  HTML5 – no more plugins -  UI/UX – Sencha/extJS, GWT, jQuery, GPU acceleration, etc -  Usable application cache -  Fast, reliable, secure -  Minimal impact to back-end services -  Works with pub/sub brokers and data feeds -  High message rate, small payload – equity ticks, watchlist, currency pairs, etc. © 2013 Kaazing Corporation
  • 8. Everything sounds do-able, except… §  Designed for document transfer – HTTP -  Short-lived Request / Response interaction §  Bidirectional, but half-duplex -  Traffic flows in only one direction at a time §  Stateless -  Large amounts of metadata resent for each request Web was not designed for “real-time”, event-based services… © 2013 Kaazing Corporation
  • 9. Some things age well… HTTP TCP © 2013 Kaazing Corporation
  • 10. …and some things don’t Oldies Hits - AJAX and the Comet Pollers - 2006 © 2013 Kaazing Corporation
  • 11. High-Level Trading Systems Architecture iOS/Android Pricing Feeds Authentication Authorization Mobile Browser/Native Client Make Net me Msg News/Alerts Web Broker friendly Browser JMS/AMQP etc… Trade Exec What everyone does… Desktop Java/.NET Reports © 2013 Kaazing Corporation
  • 12. High-Level Trading Systems Architecture iOS/Android Pricing Feeds Authentication Authorization Mobile Browser/Native Client Make Net me Msg News/Alerts Web Broker friendly Browser JMS/AMQP etc… Trade Exec Developers want a secure version of this Desktop architecture so they Java/.NET can focus on the app Reports © 2013 Kaazing Corporation
  • 13. Real-time Client/Server Architecture Instead, we try this traditional solution Trading App Broker Just have to open some ports… Merely deploy Java/.NET on Only need to traverse several client… proxies between the endpoints… Easy, right?... © 2013 Kaazing Corporation
  • 14. Middleware for the Middleware Or we try to proxy things over the web ticker plant Scalability    Issues…   Protocol  mismatches…   Inefficient…   Latency  Issues…   © 2013 Kaazing Corporation
  • 15. Things aren’t looking too good… © 2013 Kaazing Corporation
  • 16. Welcome HTML5 (aka The New Web)! §  Users are Demanding more from Apps §  UI/UX Requirements are more sophisticated §  API Explosion §  Browser Enhancements §  Web no longer just about Documents but the existing infrastructure reflects this legacy The New Web is a Foundation for Enterprise-grade Applications 14 © 2013 Kaazing Corporation
  • 17. WebSocket •  “Real-Time”, bi-directional connectivity •  IETF Protocol - RFC 6455 – Dec 2011 •  W3C API •  Easily add event-based (trading) data to web apps •  Avoids polling •  Avoids HTTP meta-data overhead •  Shares port with HTTP (80/443) •  Peer protocol to HTTP (both use TCP) •  Most Important API in HTML5 •  Facilitates other protocols •  Puts the web in a better place… © 2013 Kaazing Corporation
  • 18. WebSocket Standards §  W3C API – Candidate Recommendation -  http://www.w3.org/TR/websockets/ §  IETF Formal Protocol (RFC 6455) -  Event-driven JavaScript API -  Full-duplex communication protocol §  Integrates HTTP addressing -  ws://yourcompany.com/collaboration_svc -  wss://anothercompany.com/marketdata_svc §  Traverses firewalls, proxies, routers securely §  Text and Binary §  Leverages Cross-Origin Resource Sharing (CORS) © 2013 Kaazing Corporation
  • 19. The WebSocket Handshake © 2013 Kaazing Corporation
  • 20. For Real-Time, Event-based Web Communication… Legacy HTTP vs WebSocket Seems like a no-brainer for trading apps… 18 © 2013 Kaazing Corporation
  • 21. Java API for WebSocket - JSR 356 §  Creation of WebSocket Java components to handle bi-directional WebSocket conversations §  Handling WebSocket events §  Creation and consumption of WebSocket text and binary messages §  Allows for WebSocket protocols and content models for an application §  Configuration and management of WebSocket sessions, like timeouts, retries, cookies, connection pooling §  Specification of how WebSocket application will work within the Java EE security model! §  Official Java SE WebSocket API in the works… © 2013 Kaazing Corporation
  • 22. Why do I Care? What does this really have to do with high- performance messaging? © 2013 Kaazing Corporation
  • 23. Legacy Web Half Duplex - HTTP Full duplex Web Browser Web Tier Middleware Msg Broker Live Web Full duplex - WebSocket Full duplex Web WebSocket Msg Broker Server © 2013 Kaazing Corporation
  • 24. Scalability – more traders, more services Complexity More Traders More Services More…More… Growth Greco’s Law! Scalability = Growth / Complexity Simple things scale… 22 © 2013 Kaazing Corporation 22
  • 25. HTML5 WebSocket API © 2013 Kaazing Corporation
  • 26. HTML5 WebSocket API But… Dealing with WebSocket is like dealing with TCP. It’s a streams-based model. You need to understand how to handle streams-based data over the wire. So how do I do publish/subscribe for my trading system? © 2013 Kaazing Corporation
  • 27. What is Missing? Where is the Application-level Protocol? •  Who handles retries? •  How do we handle publish/subscribe semantics? •  How do we handle market data? •  Is guaranteed delivery possible (trades)? •  What if the client is not active? •  How do we handle [fill in with favorite semantics] •  What about partials? •  Who’s responsible for entitlements? How do I manage that? •  etc… © 2013 Kaazing Corporation
  • 28. But wait… Protocol Layering is Possible! Whoa…  Its  just  like  TCP!      Huzzah!   Browser and Native Applications JMS XMPP AMQP B2B FTP VNC mktdata etc WebSocket TCP Internet WebSocket WebSocket Gateway Gateway © 2013 Kaazing Corporation
  • 29. Anything Else Missing? Other Considerations… •  Need to handle multiple WS versions •  Need to handle multiple (and legacy) browser versions •  Can’t have business logic in the DMZ •  Have to work in multiple DMZs •  AuthN/AuthZ has to work multiple times •  High-availability topology •  Concerns about open ports with back-end service •  Services architecture needs to be consistent •  Native, HTML5 and hybrid environments •  Integrate easily with non-messaging services •  XaaS integration – the Web beyond the browser •  Bandwidth management •  etc… All things you need for a real enterprise app © 2013 Kaazing Corporation
  • 30. Publish/Subscribe over the Web for Trading Systems Java Message Service (JMS) over WebSocket A 60-second Tutorial In case you haven’t heard of JMS… © 2013 Kaazing Corporation
  • 31. Java Message Service (JMS) •  Java EE Message Oriented Middleware •  JMS 1.0 2001, JMS 1.1 2002, JMS 2.0 (Feb 26, 2013) •  Asynchronous Messaging vs. RPC •  Loosely coupled vs. Tightly coupled •  Pub/Sub, Topics, Queues •  Transactions, Reliable © 2013 Kaazing Corporation
  • 32. Basic Inside-the-Firewall JMS conn = createConnection(); sess = conn.createSession(); topic = jndiContext.lookup(topic); pub = sess.createProducer(topic); pub.send(“hey Frank”); conn = createConnection(); conn = createConnection(); sess = conn.createSession(); conn conn.createSession(); = createConnection(); topic = = = conn.createSession(); sess jndiContext.lookup(topic); sess jndiContext.lookup(topic); sub = = = jndiContext.lookup(topic); topic sess.createConsumer(topic); topic sub = sess.createConsumer(topic); sub.setMessageListener(this); sub = sess.createConsumer(topic); sub.setMessageListener(this); … sub.setMessageListener(this); … public void onMessage(Message m) { … public voidm.getText(); = onMessage(Message m) { String s void onMessage(Message m) { public s = m.getText(); msg String … do stuff… m.getText(); String s = … do stuff… broker } } … do stuff… } © 2013 Kaazing Corporation
  • 33. Now… JMS API for JavaScript 1.  Create connection from ConnectionFactory see tutorial.kaazing.com 2.  Create session 3.  Create topic or queue 4.  Create producer 5.  Create consumer 6.  Create message listeners (function to handle messages) 2 session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); 3 var myTopic = session.createTopic("/topic/myTopic"); 4 topicProducer = session.createProducer(myTopic); 5 topicConsumer = session.createConsumer(myTopic); 6 topicConsumer.setMessageListener(handleTopicMessage); © 2013 Kaazing Corporation
  • 34. JMS API for JavaScript 7.  Send messages var doSend = function(message) { message.setStringProperty(MESSAGE_PROPERTIES.userId, userId); topicProducer.send(null, message, DeliveryMode.NON_PERSISTENT, 3, 1, function() sendFromQueue(); }); }; 8.  Process messages: the message listener function: handleTopicMessage() var handleTopicMessage = function(message) { if (message.getStringProperty(MESSAGE_PROPERTIES.userId) != userId) { $("#slider").val(message.getText()); $("#pic").width(message.getText()); } }; © 2013 Kaazing Corporation
  • 35. WebSocket Projects, OSS, Vendors •  Kaazing •  Node.js/socket.io •  ActiveMQ •  Tomcat •  Jetty •  Oracle Glassfish •  Java EE •  Play Framework •  Rabbit MQ •  JBoss •  IIS/ASP .NET 4.5 •  PHP, Objective-C, Ruby, Python, C/C++, JVM-langs… •  Many more… © 2013 Kaazing Corporation
  • 36. Futures What’s next for Trading Systems and the Web? 34 © 2013 Kaazing Corporation
  • 37. New Computing Model Clouds 35 © 2013 Kaazing Corporation
  • 38. New Computing Model Storage Regulatory Docs hypothetical Email Cloud Cloud Clearance websocket websocket Collaboration Cloud websocket websocket Wealth Management websocket Notifications Enterprise Transactions Cloud FX Cloud Cloud Sentiment Analytics Risk Analysis Management 36 © 2013 Kaazing Corporation
  • 39. Inter-Cloud Connectivity or XaaS Clearance as Compliance a Service as a Service External Cloud Service Bus websocket service service service Risk Management Regulatory as a Service iPaaS Auditing as a Service websocket Internet Service Bus Enterprise Enterprise Service Bus service service service 37 © 2013 Kaazing Corporation
  • 40. Event-based XaaS – Everything as a Service in Real-Time Integration as a Service Monitoring as a Service Governance as a Service Identity as a Service Testing as a WAN Optimization as a Service Risk Analytics Service as a Service Data Center as a Service Windows Desktop Enterprise Messaging as a Service as a Service CDN as a Service Network as a Service Sentiment Analysis as a Service Trade Clearance as a Service Database as a Service Notification as a Service Security as a Service Backup Analytics as a Service as a Service EAI as a Service Telephony as a Auditing as a Service Service 38 © 2013 Kaazing Corporation
  • 41. Global Distribution – Next Generation CDN © 2013 Kaazing Corporation
  • 42. Questions? frank.greco@kaazing.com © 2013 Kaazing Corporation
  • 43. Enterprise-Quality Features – WebSocket++ Extends Browser as 24x7 Global IETF RFC full enterprise client Full JMS API for Support Compliance JavaScript, .NET, No business logic in Flash, iOS, Android Can Connect to Gateway - can be (soon) any TCP or UDP installed securely in DMZ Granular Client data source Timeouts for mobile JMS Topics, Queues, to detect offline Emulation when Durables, Acks for intermediaries block Guaranteed msgs iOS-APNS & native WS Android/GCM JMS Edition Works with any Integration JMS provider - no broker lock-in AuthN/AuthZ Bandwidth Kerberos and SSO Control Secure Services – can over WS integration close all inbound ports No Server-Side API Emulates WebSocket End-to-End for messaging needed protocol for old encrypted messages for legacy integration browsers w/ no polling for multiple DMZs © 2013 Kaazing Corporation