SlideShare a Scribd company logo
1 of 42
Download to read offline
Building	
  Real-­‐Time	
  Web	
  Applica4ons	
  
Tony	
  Abou-­‐Assaleh	
  &	
  Mark	
  Dineen	
  
October	
  22,	
  2013	
  
Volta	
  Labs	
  
Agenda	
  
• 
• 
• 
• 
• 
• 
• 

What	
  is	
  real-­‐time	
  web	
  
The	
  stack	
  
Client-­‐side	
  
Server-­‐side	
  
The	
  Flow	
  
Beyond	
  the	
  basics	
  
Live	
  Tutorial	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

2	
  
Who	
  we	
  are	
  
•  Tony	
  Abou-­‐Assaleh	
  
–  PhD	
  in	
  Computer	
  Science	
  from	
  Dal	
  
–  Cofounder	
  and	
  CEO,	
  TitanFile	
  
–  Ex-­‐Google,	
  VP	
  Tech	
  /	
  R&D	
  Director	
  @	
  
GenieKnows	
  
–  Developed	
  the	
  initial	
  real-­‐time	
  components	
  of	
  
TitanFile	
  
–  Core	
  member	
  of	
  Backbone	
  Marionette	
  Team	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

3	
  
Who	
  we	
  are	
  
•  Mark	
  Dineen	
  
–  CTO,	
  TitanFile	
  
–  Made	
  RT	
  in	
  TitanFile	
  fast	
  and	
  secure	
  
–  Director	
  of	
  IT	
  at	
  Allianz	
  
–  Compliance	
  and	
  security	
  veteran	
  
–  Contributor	
  at	
  OWASP.org	
  	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

4	
  
What	
  is	
  Real-­‐Time	
  Web?	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

5	
  
What	
  is	
  Real-­‐Time	
  Web?	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

6	
  
What	
  is	
  Real-­‐Time	
  Web?	
  
• 
• 
• 
• 

Saves	
  to	
  the	
  database	
  ≠	
  real-­‐time	
  Web	
  
Periodic	
  refresh	
  ≠	
  real-­‐time	
  Web	
  
Real-­‐time	
  computing	
  ≠	
  real-­‐time	
  Web	
  
Real-­‐time	
  streaming	
  ≠	
  real-­‐time	
  Web	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

7	
  
What	
  is	
  Real-­‐Time	
  Web?	
  
A	
  set	
  of	
  technologies	
  and	
  practices	
  that	
  enable	
  
users	
  to	
  receive	
  information	
  as	
  soon	
  as	
  it	
  is	
  
published	
  by	
  its	
  authors,	
  rather	
  than	
  requiring	
  
that	
  they	
  or	
  their	
  software	
  check	
  a	
  source	
  
periodically	
  for	
  updates.	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

8	
  
What	
  is	
  Real-­‐Time	
  Web?	
  
• 
• 
• 
• 

Dynamic	
  user	
  interface	
  
Server-­‐side	
  push	
  
Event-­‐driven	
  
Asynchronous	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

9	
  
Applica4on	
  of	
  RT	
  Web	
  
• 
• 
• 
• 
• 
• 
• 

Chat,	
  communication	
  
Collaboration	
  
Co-­‐editing,	
  co-­‐browsing,	
  co-­‐shopping	
  
Dashboards	
  and	
  monitoring	
  
Gaming	
  
Social	
  Web	
  
Date	
  Streaming	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

10	
  
The	
  Stack	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

11	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

12	
  
The	
  Stack	
  
•  Asynchronous,	
  dynamic	
  client	
  
•  HTML5	
  WebSockets	
  
	
  

•  Asynchronous	
  backend	
  server	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

13	
  
The	
  Stack	
  @	
  TitanFile	
  

Client	
  

Server	
  
Dispatcher	
  
TornadIO2	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

14	
  
Client-­‐Side	
  Stack	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

15	
  
Transport	
  Op4ons	
  -­‐	
  Comet	
  
•  HTML5	
  WebSockets	
  
•  Flash	
  Socket	
  
•  Long	
  Polling	
  
–  IFrame	
  
–  Ajax	
  
–  XMLHttpRequest	
  
–  JSONP	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

16	
  
Cross-­‐origin	
  resource	
  sharing	
  (CORS)	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

17	
  
Polling	
  vs.	
  WebSockets	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

18	
  
WebSocket	
  Handshake	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

19	
  
WebSocket	
  Op4ons	
  
•  Plain	
  HTML5	
  WebSockets	
  
	
  
•  SockJS	
  
•  Socket.io	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

20	
  
HTML5	
  WebSockets	
  
• 
• 
• 
• 

Open	
  Connection	
  
Send	
  message	
  
On	
  message	
  event	
  
Close	
  connection	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

21	
  
SockJS	
  
• 
• 
• 
• 

WebSocket	
  Emulator	
  
Follows	
  HTML5	
  WebSocket	
  API	
  
Cross-­‐domain	
  support	
  
Polling	
  as	
  fallback	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

22	
  
Socket.IO	
  
•  Real-­‐time	
  Web	
  App	
  Protocol	
  
•  Event-­‐based	
  communication	
  
–  Connection	
  events	
  
–  Named	
  events	
  

•  Broadcast	
  
•  Cross-­‐browser	
  and	
  platform	
  
•  Server-­‐side	
  (Node.JS)	
  and	
  client-­‐side	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

23	
  
Server-­‐Side	
  Stack	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

24	
  
Real-­‐Time	
  Web	
  Servers	
  
•  Most	
  modern	
  languages	
  …	
  
•  Many	
  modern	
  frameworks	
  …	
  
–  NodeJS	
  
–  Tornado	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

25	
  
The	
  Flow	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

26	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

27	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

28	
  
More	
  Detailed	
  (Useful)	
  Flow	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

29	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

30	
  
Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

31	
  
Pub	
  Sub	
  PaPern	
  
• 
• 
• 
• 

Decouples	
  senders	
  from	
  receivers	
  
Intermediate	
  hub	
  
Senders	
  –	
  publish	
  messages	
  to	
  a	
  channel	
  
Receivers	
  –	
  subscribe	
  to	
  a	
  channel	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

32	
  
The	
  Flow	
  @	
  TitanFile	
  
Sender	
  Client	
  

Server	
  

Recipient	
  Client	
  

User	
  Action	
  

Django	
  
Model	
  Saved	
  

Django	
  
post_save	
  

Render	
  
changes	
  

Backbone	
  
Model	
  Saved	
  

Django	
  
Handler	
  

Django	
  signal	
  
handler	
  

Backbone	
  
handler	
  

ioSync	
  
Socket.io	
  

TornadIO2	
  
Dispatcher	
  

TorandIO2	
  
Broadcast	
  

ioBind	
  
Socket.io	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

33	
  
Beyond	
  the	
  Basics	
  
	
  
Real-­‐World	
  Challenges	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

34	
  
Real	
  World	
  Challenges	
  
• 
• 
• 
• 

Authentication	
  
Security	
  
Binary	
  Data	
  (Files)	
  
Blocking	
  Code	
  
–  Database,	
  File	
  I/O,	
  Network	
  

•  Scalability	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

35	
  
Authen4ca4on	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

36	
  
Security	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

37	
  
Binary	
  Data	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

38	
  
Blocking	
  Code	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

39	
  
Scalability	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

40	
  
Live	
  Tutorial	
  
https://github.com/mdineen/chatserver	
  

Copyright	
  (c)	
  2013	
  TitanFile	
  Inc.	
  

41	
  
Tony	
  Abou-­‐Assaleh	
  &	
  Mark	
  Dineen	
  
https://www.titanFile.com	
  
{taa,mark}@titanFile.com	
  
Twitter:	
  @tony_aa,	
  @DineenMa	
  

More Related Content

What's hot

Cybersquatting
CybersquattingCybersquatting
Cybersquattingbobbyb85
 
Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)
Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)
Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)MongoDB
 
Tot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJ
Tot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJTot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJ
Tot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJSorin Ciprian
 
How to setup shopify store
How to setup shopify storeHow to setup shopify store
How to setup shopify storeGoWebBaby
 
Cybersquatting
CybersquattingCybersquatting
Cybersquattinglizzielith
 
Metaverse building (blockchain, nft, 3d, vr)
Metaverse building (blockchain, nft, 3d, vr)Metaverse building (blockchain, nft, 3d, vr)
Metaverse building (blockchain, nft, 3d, vr)Wajdi Ben Rabah
 
Web 3.0 - The Future of Web
Web 3.0 - The Future of WebWeb 3.0 - The Future of Web
Web 3.0 - The Future of WebMarcelo Serpa
 
Freedom of expression
Freedom of expressionFreedom of expression
Freedom of expressionGerwin Ocsena
 
Plastics
PlasticsPlastics
Plasticscpandiv
 
Pultrusion and frp bridge case study
Pultrusion and frp bridge case studyPultrusion and frp bridge case study
Pultrusion and frp bridge case studyVaibhav Srivastava
 
Trademark Infringements in E-commerce: A Comparative Study of India, China & USA
Trademark Infringements in E-commerce: A Comparative Study of India, China & USATrademark Infringements in E-commerce: A Comparative Study of India, China & USA
Trademark Infringements in E-commerce: A Comparative Study of India, China & USAProf. (Dr.) Tabrez Ahmad
 
CATÁLOGO SUOMY 2023
CATÁLOGO SUOMY 2023CATÁLOGO SUOMY 2023
CATÁLOGO SUOMY 2023LusomotosSA
 

What's hot (20)

Cybersquatting
CybersquattingCybersquatting
Cybersquatting
 
Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)
Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)
Developing with the Modern App Stack: MEAN and MERN (with Angular2 and ReactJS)
 
Tot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJ
Tot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJTot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJ
Tot ce trebuie sa stii despre tratamentul hemorozilor. PROCTOLOGIE CLUJ
 
Ae2_22_progressive collapse analysis_test 2_2021_solved
  Ae2_22_progressive collapse analysis_test 2_2021_solved  Ae2_22_progressive collapse analysis_test 2_2021_solved
Ae2_22_progressive collapse analysis_test 2_2021_solved
 
Compression molding
Compression moldingCompression molding
Compression molding
 
Tai lieu ve composite frp
Tai lieu ve composite frpTai lieu ve composite frp
Tai lieu ve composite frp
 
How to setup shopify store
How to setup shopify storeHow to setup shopify store
How to setup shopify store
 
Cybersquatting
CybersquattingCybersquatting
Cybersquatting
 
Metaverse building (blockchain, nft, 3d, vr)
Metaverse building (blockchain, nft, 3d, vr)Metaverse building (blockchain, nft, 3d, vr)
Metaverse building (blockchain, nft, 3d, vr)
 
Web 3.0 - The Future of Web
Web 3.0 - The Future of WebWeb 3.0 - The Future of Web
Web 3.0 - The Future of Web
 
Freedom of expression
Freedom of expressionFreedom of expression
Freedom of expression
 
Plastics
PlasticsPlastics
Plastics
 
Pultrusion and frp bridge case study
Pultrusion and frp bridge case studyPultrusion and frp bridge case study
Pultrusion and frp bridge case study
 
Trademark Infringements in E-commerce: A Comparative Study of India, China & USA
Trademark Infringements in E-commerce: A Comparative Study of India, China & USATrademark Infringements in E-commerce: A Comparative Study of India, China & USA
Trademark Infringements in E-commerce: A Comparative Study of India, China & USA
 
Computer Crime
Computer CrimeComputer Crime
Computer Crime
 
CATÁLOGO SUOMY 2023
CATÁLOGO SUOMY 2023CATÁLOGO SUOMY 2023
CATÁLOGO SUOMY 2023
 
Web Development
Web DevelopmentWeb Development
Web Development
 
CATU Electrical Safety Catalogue
CATU Electrical Safety CatalogueCATU Electrical Safety Catalogue
CATU Electrical Safety Catalogue
 
WORDPRESS
WORDPRESSWORDPRESS
WORDPRESS
 
Astm bis iso
Astm bis isoAstm bis iso
Astm bis iso
 

Viewers also liked

HTML5 WebSockets in Python/Django
HTML5 WebSockets in Python/DjangoHTML5 WebSockets in Python/Django
HTML5 WebSockets in Python/DjangoTony Abou-Assaleh
 
Le UX Design en Afrique - WIAD Lyon 2017
Le UX Design en Afrique - WIAD Lyon 2017Le UX Design en Afrique - WIAD Lyon 2017
Le UX Design en Afrique - WIAD Lyon 2017YUX Dakar
 
Security and governance in the cloud
Security and governance in the cloudSecurity and governance in the cloud
Security and governance in the cloudJulian Knight
 
How Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian KarlHow Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian KarlSmartBear
 
Talking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer DiscoveryTalking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer DiscoveryNew York University
 
Quality Built In @ Spotify
Quality Built In @ SpotifyQuality Built In @ Spotify
Quality Built In @ SpotifyAndrii Dzynia
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1Qualitest
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test AutomationPekka Klärck
 
Ross Snyder, Etsy, SXSW Lean Startup 2013
Ross Snyder, Etsy, SXSW Lean Startup 2013Ross Snyder, Etsy, SXSW Lean Startup 2013
Ross Snyder, Etsy, SXSW Lean Startup 2013500 Startups
 
Design, Create & Explore Learning with Your Mobile Devices
Design, Create & Explore Learning with Your Mobile DevicesDesign, Create & Explore Learning with Your Mobile Devices
Design, Create & Explore Learning with Your Mobile DevicesNick Floro
 
Tips for Designing, Testing & Delivering eLearning in a Multi-device World
Tips for Designing, Testing & Delivering eLearning in a Multi-device WorldTips for Designing, Testing & Delivering eLearning in a Multi-device World
Tips for Designing, Testing & Delivering eLearning in a Multi-device WorldUpside Learning Solutions
 
Как заработать в облаке? FAQ для реселлеров и интеграторов
Как заработать в облаке? FAQ для реселлеров и интеграторовКак заработать в облаке? FAQ для реселлеров и интеграторов
Как заработать в облаке? FAQ для реселлеров и интеграторовMichael Kozloff
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsJez Humble
 
The Copywriter’s Handbook
The Copywriter’s HandbookThe Copywriter’s Handbook
The Copywriter’s HandbookColin Post
 

Viewers also liked (15)

HTML5 WebSockets in Python/Django
HTML5 WebSockets in Python/DjangoHTML5 WebSockets in Python/Django
HTML5 WebSockets in Python/Django
 
Le UX Design en Afrique - WIAD Lyon 2017
Le UX Design en Afrique - WIAD Lyon 2017Le UX Design en Afrique - WIAD Lyon 2017
Le UX Design en Afrique - WIAD Lyon 2017
 
Security and governance in the cloud
Security and governance in the cloudSecurity and governance in the cloud
Security and governance in the cloud
 
How Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian KarlHow Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian Karl
 
Talking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer DiscoveryTalking to Humans: The Art of Customer Discovery
Talking to Humans: The Art of Customer Discovery
 
Quality Built In @ Spotify
Quality Built In @ SpotifyQuality Built In @ Spotify
Quality Built In @ Spotify
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1
 
The impact of AI on work
The impact of AI on workThe impact of AI on work
The impact of AI on work
 
Introduction to Test Automation
Introduction to Test AutomationIntroduction to Test Automation
Introduction to Test Automation
 
Ross Snyder, Etsy, SXSW Lean Startup 2013
Ross Snyder, Etsy, SXSW Lean Startup 2013Ross Snyder, Etsy, SXSW Lean Startup 2013
Ross Snyder, Etsy, SXSW Lean Startup 2013
 
Design, Create & Explore Learning with Your Mobile Devices
Design, Create & Explore Learning with Your Mobile DevicesDesign, Create & Explore Learning with Your Mobile Devices
Design, Create & Explore Learning with Your Mobile Devices
 
Tips for Designing, Testing & Delivering eLearning in a Multi-device World
Tips for Designing, Testing & Delivering eLearning in a Multi-device WorldTips for Designing, Testing & Delivering eLearning in a Multi-device World
Tips for Designing, Testing & Delivering eLearning in a Multi-device World
 
Как заработать в облаке? FAQ для реселлеров и интеграторов
Как заработать в облаке? FAQ для реселлеров и интеграторовКак заработать в облаке? FAQ для реселлеров и интеграторов
Как заработать в облаке? FAQ для реселлеров и интеграторов
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance Tests
 
The Copywriter’s Handbook
The Copywriter’s HandbookThe Copywriter’s Handbook
The Copywriter’s Handbook
 

Similar to Building Real-Time Web Applications

NYC Titanium User's Group - tiConf US Revisited
NYC Titanium User's Group - tiConf US RevisitedNYC Titanium User's Group - tiConf US Revisited
NYC Titanium User's Group - tiConf US RevisitedJohn Oliva
 
Comparison of Open Source Frameworks for Integrating the Internet of Things
Comparison of Open Source Frameworks for Integrating the Internet of ThingsComparison of Open Source Frameworks for Integrating the Internet of Things
Comparison of Open Source Frameworks for Integrating the Internet of ThingsKai Wähner
 
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...Kai Wähner
 
Sc manufacturing conference and expo hitachi i io-t april 20 2016 final
Sc manufacturing conference and expo   hitachi i io-t april 20 2016 finalSc manufacturing conference and expo   hitachi i io-t april 20 2016 final
Sc manufacturing conference and expo hitachi i io-t april 20 2016 finalKeith Brown
 
From zero to one - How we evolved our test automation processes and mindset i...
From zero to one - How we evolved our test automation processes and mindset i...From zero to one - How we evolved our test automation processes and mindset i...
From zero to one - How we evolved our test automation processes and mindset i...Jen-Chieh Ko
 
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...Amir Zmora
 
Microservices at Scale with Istio
Microservices at Scale with IstioMicroservices at Scale with Istio
Microservices at Scale with IstioJesse Butler
 
Using Appcelerator Titanium to build native android apps without the native pain
Using Appcelerator Titanium to build native android apps without the native painUsing Appcelerator Titanium to build native android apps without the native pain
Using Appcelerator Titanium to build native android apps without the native painGaurav Kheterpal
 
TiConf Australia 2013
TiConf Australia 2013TiConf Australia 2013
TiConf Australia 2013Jeff Haynie
 
Effective IoT System on Openstack
Effective IoT System on OpenstackEffective IoT System on Openstack
Effective IoT System on OpenstackTakashi Kajinami
 
Recommendation at scale
Recommendation at scaleRecommendation at scale
Recommendation at scalesimondolle
 
Triton: A peer-assisted cloud storage systems
Triton: A peer-assisted cloud storage systems Triton: A peer-assisted cloud storage systems
Triton: A peer-assisted cloud storage systems Antonio Davoli
 
InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020 InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020 InfluxData
 
Mission Possible: Future of IT Support
Mission Possible: Future of IT SupportMission Possible: Future of IT Support
Mission Possible: Future of IT SupportCompTIA
 
Crafting enhanced customer experience through chatbots, beacons and oracle jet
Crafting enhanced customer experience through chatbots, beacons and oracle jetCrafting enhanced customer experience through chatbots, beacons and oracle jet
Crafting enhanced customer experience through chatbots, beacons and oracle jetRohit Dhamija
 
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud ThreatsBeyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud ThreatsSBWebinars
 
[Public] 7 archetipi della tecnologia moderna [italy]
[Public] 7 archetipi della tecnologia moderna [italy][Public] 7 archetipi della tecnologia moderna [italy]
[Public] 7 archetipi della tecnologia moderna [italy]Nicolas Bortolotti
 

Similar to Building Real-Time Web Applications (20)

NYC Titanium User's Group - tiConf US Revisited
NYC Titanium User's Group - tiConf US RevisitedNYC Titanium User's Group - tiConf US Revisited
NYC Titanium User's Group - tiConf US Revisited
 
Comparison of Open Source Frameworks for Integrating the Internet of Things
Comparison of Open Source Frameworks for Integrating the Internet of ThingsComparison of Open Source Frameworks for Integrating the Internet of Things
Comparison of Open Source Frameworks for Integrating the Internet of Things
 
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
 
Sc manufacturing conference and expo hitachi i io-t april 20 2016 final
Sc manufacturing conference and expo   hitachi i io-t april 20 2016 finalSc manufacturing conference and expo   hitachi i io-t april 20 2016 final
Sc manufacturing conference and expo hitachi i io-t april 20 2016 final
 
tiConf (la dediff)
tiConf (la dediff)tiConf (la dediff)
tiConf (la dediff)
 
Python Diamond Tool
Python Diamond ToolPython Diamond Tool
Python Diamond Tool
 
From zero to one - How we evolved our test automation processes and mindset i...
From zero to one - How we evolved our test automation processes and mindset i...From zero to one - How we evolved our test automation processes and mindset i...
From zero to one - How we evolved our test automation processes and mindset i...
 
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
 
Microservices at Scale with Istio
Microservices at Scale with IstioMicroservices at Scale with Istio
Microservices at Scale with Istio
 
Using Appcelerator Titanium to build native android apps without the native pain
Using Appcelerator Titanium to build native android apps without the native painUsing Appcelerator Titanium to build native android apps without the native pain
Using Appcelerator Titanium to build native android apps without the native pain
 
TiConf Australia 2013
TiConf Australia 2013TiConf Australia 2013
TiConf Australia 2013
 
Effective IoT System on Openstack
Effective IoT System on OpenstackEffective IoT System on Openstack
Effective IoT System on Openstack
 
Recommendation at scale
Recommendation at scaleRecommendation at scale
Recommendation at scale
 
Triton: A peer-assisted cloud storage systems
Triton: A peer-assisted cloud storage systems Triton: A peer-assisted cloud storage systems
Triton: A peer-assisted cloud storage systems
 
InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020 InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020
 
Mission Possible: Future of IT Support
Mission Possible: Future of IT SupportMission Possible: Future of IT Support
Mission Possible: Future of IT Support
 
Introduction to RTI DDS
Introduction to RTI DDSIntroduction to RTI DDS
Introduction to RTI DDS
 
Crafting enhanced customer experience through chatbots, beacons and oracle jet
Crafting enhanced customer experience through chatbots, beacons and oracle jetCrafting enhanced customer experience through chatbots, beacons and oracle jet
Crafting enhanced customer experience through chatbots, beacons and oracle jet
 
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud ThreatsBeyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
 
[Public] 7 archetipi della tecnologia moderna [italy]
[Public] 7 archetipi della tecnologia moderna [italy][Public] 7 archetipi della tecnologia moderna [italy]
[Public] 7 archetipi della tecnologia moderna [italy]
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Building Real-Time Web Applications

  • 1. Building  Real-­‐Time  Web  Applica4ons   Tony  Abou-­‐Assaleh  &  Mark  Dineen   October  22,  2013   Volta  Labs  
  • 2. Agenda   •  •  •  •  •  •  •  What  is  real-­‐time  web   The  stack   Client-­‐side   Server-­‐side   The  Flow   Beyond  the  basics   Live  Tutorial   Copyright  (c)  2013  TitanFile  Inc.   2  
  • 3. Who  we  are   •  Tony  Abou-­‐Assaleh   –  PhD  in  Computer  Science  from  Dal   –  Cofounder  and  CEO,  TitanFile   –  Ex-­‐Google,  VP  Tech  /  R&D  Director  @   GenieKnows   –  Developed  the  initial  real-­‐time  components  of   TitanFile   –  Core  member  of  Backbone  Marionette  Team   Copyright  (c)  2013  TitanFile  Inc.   3  
  • 4. Who  we  are   •  Mark  Dineen   –  CTO,  TitanFile   –  Made  RT  in  TitanFile  fast  and  secure   –  Director  of  IT  at  Allianz   –  Compliance  and  security  veteran   –  Contributor  at  OWASP.org     Copyright  (c)  2013  TitanFile  Inc.   4  
  • 5. What  is  Real-­‐Time  Web?   Copyright  (c)  2013  TitanFile  Inc.   5  
  • 6. What  is  Real-­‐Time  Web?   Copyright  (c)  2013  TitanFile  Inc.   6  
  • 7. What  is  Real-­‐Time  Web?   •  •  •  •  Saves  to  the  database  ≠  real-­‐time  Web   Periodic  refresh  ≠  real-­‐time  Web   Real-­‐time  computing  ≠  real-­‐time  Web   Real-­‐time  streaming  ≠  real-­‐time  Web   Copyright  (c)  2013  TitanFile  Inc.   7  
  • 8. What  is  Real-­‐Time  Web?   A  set  of  technologies  and  practices  that  enable   users  to  receive  information  as  soon  as  it  is   published  by  its  authors,  rather  than  requiring   that  they  or  their  software  check  a  source   periodically  for  updates.   Copyright  (c)  2013  TitanFile  Inc.   8  
  • 9. What  is  Real-­‐Time  Web?   •  •  •  •  Dynamic  user  interface   Server-­‐side  push   Event-­‐driven   Asynchronous   Copyright  (c)  2013  TitanFile  Inc.   9  
  • 10. Applica4on  of  RT  Web   •  •  •  •  •  •  •  Chat,  communication   Collaboration   Co-­‐editing,  co-­‐browsing,  co-­‐shopping   Dashboards  and  monitoring   Gaming   Social  Web   Date  Streaming   Copyright  (c)  2013  TitanFile  Inc.   10  
  • 11. The  Stack   Copyright  (c)  2013  TitanFile  Inc.   11  
  • 12. Copyright  (c)  2013  TitanFile  Inc.   12  
  • 13. The  Stack   •  Asynchronous,  dynamic  client   •  HTML5  WebSockets     •  Asynchronous  backend  server   Copyright  (c)  2013  TitanFile  Inc.   13  
  • 14. The  Stack  @  TitanFile   Client   Server   Dispatcher   TornadIO2   Copyright  (c)  2013  TitanFile  Inc.   14  
  • 15. Client-­‐Side  Stack   Copyright  (c)  2013  TitanFile  Inc.   15  
  • 16. Transport  Op4ons  -­‐  Comet   •  HTML5  WebSockets   •  Flash  Socket   •  Long  Polling   –  IFrame   –  Ajax   –  XMLHttpRequest   –  JSONP   Copyright  (c)  2013  TitanFile  Inc.   16  
  • 17. Cross-­‐origin  resource  sharing  (CORS)   Copyright  (c)  2013  TitanFile  Inc.   17  
  • 18. Polling  vs.  WebSockets   Copyright  (c)  2013  TitanFile  Inc.   18  
  • 19. WebSocket  Handshake   Copyright  (c)  2013  TitanFile  Inc.   19  
  • 20. WebSocket  Op4ons   •  Plain  HTML5  WebSockets     •  SockJS   •  Socket.io   Copyright  (c)  2013  TitanFile  Inc.   20  
  • 21. HTML5  WebSockets   •  •  •  •  Open  Connection   Send  message   On  message  event   Close  connection   Copyright  (c)  2013  TitanFile  Inc.   21  
  • 22. SockJS   •  •  •  •  WebSocket  Emulator   Follows  HTML5  WebSocket  API   Cross-­‐domain  support   Polling  as  fallback   Copyright  (c)  2013  TitanFile  Inc.   22  
  • 23. Socket.IO   •  Real-­‐time  Web  App  Protocol   •  Event-­‐based  communication   –  Connection  events   –  Named  events   •  Broadcast   •  Cross-­‐browser  and  platform   •  Server-­‐side  (Node.JS)  and  client-­‐side   Copyright  (c)  2013  TitanFile  Inc.   23  
  • 24. Server-­‐Side  Stack   Copyright  (c)  2013  TitanFile  Inc.   24  
  • 25. Real-­‐Time  Web  Servers   •  Most  modern  languages  …   •  Many  modern  frameworks  …   –  NodeJS   –  Tornado   Copyright  (c)  2013  TitanFile  Inc.   25  
  • 26. The  Flow   Copyright  (c)  2013  TitanFile  Inc.   26  
  • 27. Copyright  (c)  2013  TitanFile  Inc.   27  
  • 28. Copyright  (c)  2013  TitanFile  Inc.   28  
  • 29. More  Detailed  (Useful)  Flow   Copyright  (c)  2013  TitanFile  Inc.   29  
  • 30. Copyright  (c)  2013  TitanFile  Inc.   30  
  • 31. Copyright  (c)  2013  TitanFile  Inc.   31  
  • 32. Pub  Sub  PaPern   •  •  •  •  Decouples  senders  from  receivers   Intermediate  hub   Senders  –  publish  messages  to  a  channel   Receivers  –  subscribe  to  a  channel   Copyright  (c)  2013  TitanFile  Inc.   32  
  • 33. The  Flow  @  TitanFile   Sender  Client   Server   Recipient  Client   User  Action   Django   Model  Saved   Django   post_save   Render   changes   Backbone   Model  Saved   Django   Handler   Django  signal   handler   Backbone   handler   ioSync   Socket.io   TornadIO2   Dispatcher   TorandIO2   Broadcast   ioBind   Socket.io   Copyright  (c)  2013  TitanFile  Inc.   33  
  • 34. Beyond  the  Basics     Real-­‐World  Challenges   Copyright  (c)  2013  TitanFile  Inc.   34  
  • 35. Real  World  Challenges   •  •  •  •  Authentication   Security   Binary  Data  (Files)   Blocking  Code   –  Database,  File  I/O,  Network   •  Scalability   Copyright  (c)  2013  TitanFile  Inc.   35  
  • 36. Authen4ca4on   Copyright  (c)  2013  TitanFile  Inc.   36  
  • 37. Security   Copyright  (c)  2013  TitanFile  Inc.   37  
  • 38. Binary  Data   Copyright  (c)  2013  TitanFile  Inc.   38  
  • 39. Blocking  Code   Copyright  (c)  2013  TitanFile  Inc.   39  
  • 40. Scalability   Copyright  (c)  2013  TitanFile  Inc.   40  
  • 41. Live  Tutorial   https://github.com/mdineen/chatserver   Copyright  (c)  2013  TitanFile  Inc.   41  
  • 42. Tony  Abou-­‐Assaleh  &  Mark  Dineen   https://www.titanFile.com   {taa,mark}@titanFile.com   Twitter:  @tony_aa,  @DineenMa