SlideShare a Scribd company logo
1 of 10
Server push



Leveraging server push technologies (Comet) in
WebBee framework

Dmitriy Rogatkin
January 2012
Introduction in server push

     What is server push for a web application?
            • Capability of a server to deliver new content to a browser without
              user interaction
     Is it well known or something new?
            • Pure HTML multipart x-mixed-replace request type (Netscape, MS)
              seems supported from 1998
            • multipart x-mixed-replace has limited support of browser vendors
              and has different behavior for Netscape (Mozila) and MS (IE)
            • multipart x-mixed-replace is not JS friendly and useless for Ajax
            • XML-HTTP object can be used for server push more efficiently with
              some challenges, this approach is relatively -new 5 years old
     Where server push is useful?
            • Update a user about status of long running processes
            • Alerting a user that system state changed
            • Collaborative work as chat, concurrent update resources and so on
2    © 2011 Progress Software Corporation. All rights reserved.
Challenges of server push

     Four approaches are widely used
            1. Keeping active connection with server (multipart x-mixed-replace
               or XML-HTTP, or XMLHTPP awaiting for response)
            2. Polling a server in setTimeout or setInterval, or refresh
            3. Piggy back ride of any user interaction (not really push)
            4. Utilizing HTML5 Websockets (will be presented separately)
    1. Holding a thread servicing request – challenge is to serve
       hundreds concurrent users can overload thread capacity of a
       server OS
    2. Polling requests – challenge is multiple requests from
       hundreds concurrent users can overload a server performance
       capacity
    3. Load additional information to any response to reflect server
       push items updates, the challenge is more complex responses
       and still requires user interaction (not truly server push)

3    © 2011 Progress Software Corporation. All rights reserved.
Dealing with challenges

     Avoid using polling mechanism
     Release a servicing thread and keep just connection allowing a
      separate thread pushing data in it asynchronously
     How is it implemented
            • Vendor specific ;Tomcat, Jetty, AsyncWeb and other provide
              proprietary mechanism of releasing or not involving a servicing
              thread per request
            • JSR315 AsyncContext is a standard
     JSR 315 is standard releases a dependency on a particular
      vendor, it is flexible and simple
     Where JSR315 is supported
            • TJWS
            • Jetty
            • Tomcat, JBOSS and Oracle WebLogic and IBM WebSphere

4    © 2011 Progress Software Corporation. All rights reserved.
How to make server push simple for use

     Detach all async request specific machinery in a framework
     Provide simple and flexible way to use it
     How has it done for WebBee?
            • Base servlet framework is extended to manage asynchronous
              requests and additional common Ajax handlers and services were
              added
     How to use it?
            1. Identify set of users interested in a certain event UI update
            2. For those users who are currently online push UI notification event
               to AsyncUpdater service queue
            3. Provide JS event handlers in View implementation to show UI
               updates corresponding for the pushed events
            4. Done




5    © 2011 Progress Software Corporation. All rights reserved.
Server push framework architecture




6   © 2011 Progress Software Corporation. All rights reserved.
Implementation highlights

     Developed on top of Aldan 3 servlet framework
     Small foot print JavaScript push event dispatcher
     Async update Ajax handler connected to base page service
     Registry of push event consumer pile
     Async updater service (component)
            • Manages queue of push UI event
            • Dispatches available events to piled async requests




7    © 2011 Progress Software Corporation. All rights reserved.
Room for improvements

     Won’t work in clustering environment unless Async updater
      service manages a distributed event queue
            • Resolution can be providing distributed event queue
     Container managed session timeout can not work as expected
      since server push activities may keep session valid all time
            • Resolution can be in own client or server session timeout
              implementation




8    © 2011 Progress Software Corporation. All rights reserved.
Demo

     WebBee chat application




9    © 2011 Progress Software Corporation. All rights reserved.
Server side push in Aldan 3

More Related Content

What's hot

Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2
Srikanth N
 

What's hot (20)

Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Mule management console Architecture
Mule management console ArchitectureMule management console Architecture
Mule management console Architecture
 
Anypoint connector dev kit
Anypoint connector dev kitAnypoint connector dev kit
Anypoint connector dev kit
 
Mule anypoint connector dev kit
Mule  anypoint connector dev kitMule  anypoint connector dev kit
Mule anypoint connector dev kit
 
Cloud hub and mule
Cloud hub and muleCloud hub and mule
Cloud hub and mule
 
Deployment of Mule ESB Application using MMC
Deployment of Mule ESB Application using MMCDeployment of Mule ESB Application using MMC
Deployment of Mule ESB Application using MMC
 
Mule testing
Mule testingMule testing
Mule testing
 
Mulesoft Filters
Mulesoft FiltersMulesoft Filters
Mulesoft Filters
 
Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2
 
Mule any pointstudio
Mule any pointstudioMule any pointstudio
Mule any pointstudio
 
Service oriented online architecture using mule
Service oriented online architecture using muleService oriented online architecture using mule
Service oriented online architecture using mule
 
Mule esb for beginners
Mule esb for beginnersMule esb for beginners
Mule esb for beginners
 
Mule 3.8
Mule 3.8Mule 3.8
Mule 3.8
 
Mule ESB - Intra application communication
Mule ESB - Intra application communicationMule ESB - Intra application communication
Mule ESB - Intra application communication
 
Mule ESB session day 1
Mule ESB session day 1Mule ESB session day 1
Mule ESB session day 1
 
Emad Younis - Keynote
Emad Younis - Keynote Emad Younis - Keynote
Emad Younis - Keynote
 
Mule chapter2
Mule chapter2Mule chapter2
Mule chapter2
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule anypoint data gateway
Mule  anypoint data gatewayMule  anypoint data gateway
Mule anypoint data gateway
 
Mule mule runtime engine
Mule  mule runtime engineMule  mule runtime engine
Mule mule runtime engine
 

Viewers also liked

AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...
AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...
AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...
Patrick Chanezon
 
Sphinx: Leveraging Scalable Search in Drupal
Sphinx: Leveraging Scalable Search in DrupalSphinx: Leveraging Scalable Search in Drupal
Sphinx: Leveraging Scalable Search in Drupal
elliando dias
 

Viewers also liked (20)

Google Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 yearsGoogle Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 years
 
Adam FitzGerald 2013
Adam FitzGerald 2013Adam FitzGerald 2013
Adam FitzGerald 2013
 
Java on Azure
Java on AzureJava on Azure
Java on Azure
 
WebBee rapid web app development teck stack
WebBee rapid web app development teck stackWebBee rapid web app development teck stack
WebBee rapid web app development teck stack
 
Google I/0 2009 Google Friend Connect In The Real World
Google I/0 2009 Google Friend Connect In The Real WorldGoogle I/0 2009 Google Friend Connect In The Real World
Google I/0 2009 Google Friend Connect In The Real World
 
Cloud Foundry, the Open Platform As A Service
Cloud Foundry, the Open Platform As A ServiceCloud Foundry, the Open Platform As A Service
Cloud Foundry, the Open Platform As A Service
 
Porting Xen Paravirtualization to MIPS Architecture
Porting Xen Paravirtualization to MIPS ArchitecturePorting Xen Paravirtualization to MIPS Architecture
Porting Xen Paravirtualization to MIPS Architecture
 
Devoxx France 2012 - Portrait du développeur en "The Artist"
Devoxx France 2012 - Portrait du développeur en "The Artist"Devoxx France 2012 - Portrait du développeur en "The Artist"
Devoxx France 2012 - Portrait du développeur en "The Artist"
 
AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...
AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...
AFCEA C4I Symposium: The 4th C in C4I Stands for Cloud:Factors Driving Adopti...
 
Sphinx: Leveraging Scalable Search in Drupal
Sphinx: Leveraging Scalable Search in DrupalSphinx: Leveraging Scalable Search in Drupal
Sphinx: Leveraging Scalable Search in Drupal
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupal
 
Portrait of the developer as The Artist - SpringOne India 2012
Portrait of the developer as The Artist - SpringOne India 2012Portrait of the developer as The Artist - SpringOne India 2012
Portrait of the developer as The Artist - SpringOne India 2012
 
Ux overview fxworkweek_april2012
Ux overview fxworkweek_april2012Ux overview fxworkweek_april2012
Ux overview fxworkweek_april2012
 
VMware Developer Relations Team Culture
VMware Developer Relations Team CultureVMware Developer Relations Team Culture
VMware Developer Relations Team Culture
 
RubyWorld 2011
RubyWorld 2011RubyWorld 2011
RubyWorld 2011
 
Basic Crud In Django
Basic Crud In DjangoBasic Crud In Django
Basic Crud In Django
 
JavaScript is a buffet - Scriptconf 2017 keynote
JavaScript is a buffet - Scriptconf 2017 keynoteJavaScript is a buffet - Scriptconf 2017 keynote
JavaScript is a buffet - Scriptconf 2017 keynote
 
Protecting Your Data In Office 365
Protecting Your Data In Office 365Protecting Your Data In Office 365
Protecting Your Data In Office 365
 
IAB Hungary Adex 2012 (Hungarian)
IAB Hungary Adex 2012 (Hungarian)IAB Hungary Adex 2012 (Hungarian)
IAB Hungary Adex 2012 (Hungarian)
 
Google App Engine - Devfest India 2010
Google App Engine -  Devfest India 2010Google App Engine -  Devfest India 2010
Google App Engine - Devfest India 2010
 

Similar to Server side push in Aldan 3

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
Doris Chen
 
enterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdfenterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdf
EidTahir
 

Similar to Server side push in Aldan 3 (20)

JavaOne Conference, 2008
JavaOne Conference, 2008JavaOne Conference, 2008
JavaOne Conference, 2008
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
WEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptxWEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptx
 
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
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
 
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database ConnectivityIT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
 
Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014
 
Enterprise java unit-1_chapter-2
Enterprise java unit-1_chapter-2Enterprise java unit-1_chapter-2
Enterprise java unit-1_chapter-2
 
enterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdfenterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdf
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
V mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentationV mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentation
 
Streaming to a new Jakarta EE
Streaming to a new Jakarta EEStreaming to a new Jakarta EE
Streaming to a new Jakarta EE
 
Streaming to a New Jakarta EE
Streaming to a New Jakarta EEStreaming to a New Jakarta EE
Streaming to a New Jakarta EE
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
 
Liit tyit sem 5 enterprise java unit 1 notes 2018
Liit tyit sem 5 enterprise java  unit 1 notes 2018 Liit tyit sem 5 enterprise java  unit 1 notes 2018
Liit tyit sem 5 enterprise java unit 1 notes 2018
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
 
SERVER SIDE PROGRAMMING
SERVER SIDE PROGRAMMINGSERVER SIDE PROGRAMMING
SERVER SIDE PROGRAMMING
 
Intro to Microservices Architecture
Intro to Microservices ArchitectureIntro to Microservices Architecture
Intro to Microservices Architecture
 
Microservice 微服務
Microservice 微服務Microservice 微服務
Microservice 微服務
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 

Server side push in Aldan 3

  • 1. Server push Leveraging server push technologies (Comet) in WebBee framework Dmitriy Rogatkin January 2012
  • 2. Introduction in server push  What is server push for a web application? • Capability of a server to deliver new content to a browser without user interaction  Is it well known or something new? • Pure HTML multipart x-mixed-replace request type (Netscape, MS) seems supported from 1998 • multipart x-mixed-replace has limited support of browser vendors and has different behavior for Netscape (Mozila) and MS (IE) • multipart x-mixed-replace is not JS friendly and useless for Ajax • XML-HTTP object can be used for server push more efficiently with some challenges, this approach is relatively -new 5 years old  Where server push is useful? • Update a user about status of long running processes • Alerting a user that system state changed • Collaborative work as chat, concurrent update resources and so on 2 © 2011 Progress Software Corporation. All rights reserved.
  • 3. Challenges of server push  Four approaches are widely used 1. Keeping active connection with server (multipart x-mixed-replace or XML-HTTP, or XMLHTPP awaiting for response) 2. Polling a server in setTimeout or setInterval, or refresh 3. Piggy back ride of any user interaction (not really push) 4. Utilizing HTML5 Websockets (will be presented separately) 1. Holding a thread servicing request – challenge is to serve hundreds concurrent users can overload thread capacity of a server OS 2. Polling requests – challenge is multiple requests from hundreds concurrent users can overload a server performance capacity 3. Load additional information to any response to reflect server push items updates, the challenge is more complex responses and still requires user interaction (not truly server push) 3 © 2011 Progress Software Corporation. All rights reserved.
  • 4. Dealing with challenges  Avoid using polling mechanism  Release a servicing thread and keep just connection allowing a separate thread pushing data in it asynchronously  How is it implemented • Vendor specific ;Tomcat, Jetty, AsyncWeb and other provide proprietary mechanism of releasing or not involving a servicing thread per request • JSR315 AsyncContext is a standard  JSR 315 is standard releases a dependency on a particular vendor, it is flexible and simple  Where JSR315 is supported • TJWS • Jetty • Tomcat, JBOSS and Oracle WebLogic and IBM WebSphere 4 © 2011 Progress Software Corporation. All rights reserved.
  • 5. How to make server push simple for use  Detach all async request specific machinery in a framework  Provide simple and flexible way to use it  How has it done for WebBee? • Base servlet framework is extended to manage asynchronous requests and additional common Ajax handlers and services were added  How to use it? 1. Identify set of users interested in a certain event UI update 2. For those users who are currently online push UI notification event to AsyncUpdater service queue 3. Provide JS event handlers in View implementation to show UI updates corresponding for the pushed events 4. Done 5 © 2011 Progress Software Corporation. All rights reserved.
  • 6. Server push framework architecture 6 © 2011 Progress Software Corporation. All rights reserved.
  • 7. Implementation highlights  Developed on top of Aldan 3 servlet framework  Small foot print JavaScript push event dispatcher  Async update Ajax handler connected to base page service  Registry of push event consumer pile  Async updater service (component) • Manages queue of push UI event • Dispatches available events to piled async requests 7 © 2011 Progress Software Corporation. All rights reserved.
  • 8. Room for improvements  Won’t work in clustering environment unless Async updater service manages a distributed event queue • Resolution can be providing distributed event queue  Container managed session timeout can not work as expected since server push activities may keep session valid all time • Resolution can be in own client or server session timeout implementation 8 © 2011 Progress Software Corporation. All rights reserved.
  • 9. Demo  WebBee chat application 9 © 2011 Progress Software Corporation. All rights reserved.