SlideShare a Scribd company logo
ScalingCometD to The Massesby Kevin NilsonPrincipal Architect / E*Trade Financial
LearnaboutCometD and ScalingCometDApps
AgendaQuick Intro to CometDBasic Steps (OutsideCometD)Advanced Steps (InsideCometD)
Kevin NilsonJava ChampionCo-authored Web 2.0 Fundamentals BookLeader Silicon Valley Web Developer JUGLead Silicon Valley Google Tech User GroupLeader Silicon Valley JavaScript MeetupTaught 7 Courses College Of San MateoWinner of MySpace Editor's Choice Award for project YumieDate, at Open Social Weekend Apps hosted at Google
Intro To CometDWhat’s Comet? What’s Bayeux?What’s CometD? Pushing Data to The Net over HTTPChannel & JSON Based Comet ProtocolComet Client and Server Implementation using BayeuxWhat’s WebSockets?
DEMOPolling Interal
Polling
Long Polling
Streaming
Basic Steps (OutsideCometD)Reduce overheadAllow MultithreadingRemove Simple Bottlenecks
Remove ApacheApache Has 1 Thread Per Request LimitBrowseApacheJetty
Separate Client Into TiersSome high throughput some lowSpreads broadcast over multiple threadsDelivery to 5 channels can be handled by 5 threadsDelivery to 1 Channel can be handled by only 1 thread/Player/GameUpdateHigh Volume/GameUpdatePublisher/Watcher/GameUpdateLow Volume
Only Deliver Changed Fields50% Field Delivery Reduction
Advanced StepsMove Customers to slower tier if they are not consuming fast enoughDisconnect users with very “large” queuesAuto adjust throttling if overall we are producing faster than we can consume (deliver to customers)
Before, No InternalVisiblityfilterJettyJMSBayeuxServiceBrowserLEDGENDI can seeI can’t see
Before – Full StoryfilterJettyJMSBayeuxServiceBrowserQueueLEDGENDI can seeI can’t see
AfterfilterJettyJMSBayeuxServiceBrowserQueueDeliverListenerQueueListenerLEDGENDI can seeI can’t see
Queue & Deliver Listener Codeclient.addListener(newQueueListener() {	public booleanqueueMaxed(Client client, Client client1, Message arg2) {		…		}}client.addListener(newDeliverListener( ) {	public void deliver(Client arg0, Queue<Message> queue) {			…	}}
Prevent Huge QueuefilterJettyJMSBayeuxServiceBrowserQueueCheck Queue Size:Disconnect Client if “Large”LEDGENDI can seeI can’t see
Measure Average Time in QueuefilterJettyJMSBayeuxServiceBrowserQueueCheck Time In Queue:Move Client to Slower Tier or Increase Overall ThrottlingLEDGENDI can seeI can’t see
Adjust Tier: Avg Queue Size of ClientPlatinumGoldSilverBronzeJMSMyBayeuxServicePlatinum	= 100  updates / minuteGold		=   50  updates / minuteSilver 	=   25  updates / minuteBronze	=   10  updates / minuteLEDGEND
Broadcast in CometD, not JMSJMSMyBayeuxServiceBrowserBrowserBrowserJMSMyBayeuxServiceBrowserBrowserBrowser
Channel Create & RemoveListenerJMSMyBayeuxServicechannelAddedchannelRemoved
ChannelBayeuxListener Codebayeux.addListener(newChannelBayeuxListener() {	public void channelAdded(Channel channel) {		// Code Here	}	public void channelRemoved(Channel channel) {		// Code Here	}	});
Adjust Tier Rate based on Avg Queue SizePlatinumGoldSilverBronzeJMSMyBayeuxServicePlatinum	= 100  updates / minuteGold		=   50  updates / minuteSilver 	=   25  updates / minuteBronze	=   10  updates / minutePlatinum	=   50  updates / minuteGold		=   25  updates / minuteSilver 	=   10  updates / minuteBronze	=     5  updates / minuteLEDGEND
Auto Throttle: Avg Message DelayfilterJettyJMSBayeuxServiceBrowserQueuePlatnium	=   50  updates Gold		=   25  updatesSilver 	=   10  updatesBronze	=     5  updatesPlatnium	= 100  updates Gold		=   50  updatesSilver 	=   25  updatesBronze	=   10  updatesLEDGEND
SummaryCometD IntroBasic StepsAdvanced Steps. . .
Thankskevin_nilson@dev.java.netWeb2-book.com - Web2.0 Fundamentals

More Related Content

What's hot (9)

PDF
Server-Sent Events (real-time HTTP push for HTML5 browsers)
yay w00t
 
PPS
J web socket
Hiroshi Ochi
 
PPTX
Node.js Socket.IO
Eyal Vardi
 
PDF
GWT Web Socket and data serialization
GWTcon
 
PPTX
Web Sockets
Paul Fryer
 
PDF
Introduction to Web Sockets
Jumping Bean
 
PPTX
Ws
Sunghan Kim
 
PPTX
Comet: an Overview and a New Solution Called Jabbify
Brian Moschel
 
PDF
Decoding real time web communication
AMiT JAiN
 
Server-Sent Events (real-time HTTP push for HTML5 browsers)
yay w00t
 
J web socket
Hiroshi Ochi
 
Node.js Socket.IO
Eyal Vardi
 
GWT Web Socket and data serialization
GWTcon
 
Web Sockets
Paul Fryer
 
Introduction to Web Sockets
Jumping Bean
 
Comet: an Overview and a New Solution Called Jabbify
Brian Moschel
 
Decoding real time web communication
AMiT JAiN
 

Similar to Scaling CometD by Kevin Nilson (12)

PDF
Pushing Datatothe Browserwith Comet Ajax W
rajivmordani
 
PDF
Going Live! with Comet
Simon Willison
 
PDF
Time for Comet?
Simon Willison
 
ODP
Comet / WebSocket Web Applications
Codemotion
 
PDF
Comet from JavaOne 2008
Joe Walker
 
PPT
WEB 2.0: BUILDING RICH INTERNET APPLICATIONS WITH PHP
zend
 
PDF
Comet: Making The Web a 2-Way Medium
Joe Walker
 
PDF
Cloud-Ready Web Messaging With CometD by S. Bordet
Corley S.r.l.
 
ODP
Cloud-Ready Web Messaging with CometD
Simone Bordet
 
PPTX
Taking a Quantum Leap with Html 5 WebSocket
Shahriar Hyder
 
PPT
FTS middleware doc.
chopkins19
 
PPT
Comet: by pushing server data, we push the web forward
NOLOH LLC.
 
Pushing Datatothe Browserwith Comet Ajax W
rajivmordani
 
Going Live! with Comet
Simon Willison
 
Time for Comet?
Simon Willison
 
Comet / WebSocket Web Applications
Codemotion
 
Comet from JavaOne 2008
Joe Walker
 
WEB 2.0: BUILDING RICH INTERNET APPLICATIONS WITH PHP
zend
 
Comet: Making The Web a 2-Way Medium
Joe Walker
 
Cloud-Ready Web Messaging With CometD by S. Bordet
Corley S.r.l.
 
Cloud-Ready Web Messaging with CometD
Simone Bordet
 
Taking a Quantum Leap with Html 5 WebSocket
Shahriar Hyder
 
FTS middleware doc.
chopkins19
 
Comet: by pushing server data, we push the web forward
NOLOH LLC.
 
Ad

Recently uploaded (20)

PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Ad

Scaling CometD by Kevin Nilson