SlideShare a Scribd company logo
1 of 27
Real Time Web Or having a socket in your browser Orbited, Django, MorbidQ “ideas2gather” Alex Kavanagh @ajkavanagh [email_address]
Back Story
There was this journey ...
…  so I agreed to do it (fairly large mistake)
…  so I agreed to do it (fairly large mistake)
Pre-requisites: Python Javascript IE6 (I know...)
What I chose: Orbited & MorbidQ STOMP Django jQuery
Orbited – Networking for the web http://orbited.org COMET
 
 
Django: Full Stack Web Framework Python http:www.djangoproject.com
STOMP http://stomp.codehaus.org/ The Stomp project is the Streaming Text Orientated Messaging Protocol site (or the Protocol Briefly Known as TTMP and Represented by the symbol :ttmp).
jQuery Say no more (makes cross browser javascript work)
ideas2gather (A real-time pledging system for Newcastle Council Health and Well-being Partnership event)
 
Stations machines and A Room display
Real-time updates (streaming)
 
Room Display
 
Code
{% extends &quot;base.html&quot; %} {% block title%}idea2gather - '{{ event.name }}'{% endblock %} {% block script %} <link rel=&quot;stylesheet&quot; href=&quot;/static/css/site-wide.css&quot; type=&quot;text/css&quot; /> <meta name=&quot;channel&quot; content=&quot;/topic/{{ event.key }}&quot; /> <meta name=&quot;javascript-debug&quot; content=&quot;true&quot; /> <meta name=&quot;event-key&quot; content=&quot;{{ event.key}}&quot;/> <script>document.domain=document.domain</script> <script src=&quot;http://{{ orbited_host }}/static/Orbited.js&quot;></script> <script> Orbited.settings.port = 9000; TCPSocket = Orbited.TCPSocket; Orbited.settings.streaming = false; </script> <script src=&quot;http://{{ orbited_host }}/static/protocols/stomp/stomp.js&quot;></script>
function setup_stomp(context, params) { // get our connection to the STOMP server var stomp = new STOMPClient(); stomp.onconnectedframe = function() { stomp.ready = true; stomp.subscribe(context.CHANNEL); setTimeout(params.connect_function, 4000); }; // set up the receive function. stomp.onmessageframe = function(frame) { params.receive_function( frame ); }; ...
... var logger = Orbited.getLogger(&quot;example&quot;); var reconnectTimer = null; stomp.onopen = function() { if(reconnectTimer) window.clearTimeout(reconnectTimer); }; stomp.onclose = function(c) { logger.debug('Lost Connection, Code: ' + c); reconnectTimer = window.setTimeout( function () { params.reconnect(context); }, 1000); // TODO: autoincrease with cap }; stomp.connect(document.domain, 61613); //, 'guest', 'guest'); return stomp; }
Problems (some)
IE (6,7,8) ALL different behaviours
References: http://orbited.org/blog/2008/09/integrating-orbited-with-web-app-frameworks/ http://stomp.codehaus.org/ http://www.djangoproject.com http://orbited.org

More Related Content

What's hot

Websocket protocol overview
Websocket protocol overviewWebsocket protocol overview
Websocket protocol overviewallenmeng
 
Using Websockets with Play!
Using Websockets with Play!Using Websockets with Play!
Using Websockets with Play!Andrew Conner
 
Using Websockets in Play !
Using Websockets in Play !Using Websockets in Play !
Using Websockets in Play !Knoldus Inc.
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkFabio Tiriticco
 
Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?Eduard Trayan
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglKilian Valkhof
 
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9Ilya Grigorik
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Masoud Kalali
 
Connecting to Web Services on Android
Connecting to Web Services on AndroidConnecting to Web Services on Android
Connecting to Web Services on Androidsullis
 
How to make Ajax work for you
How to make Ajax work for youHow to make Ajax work for you
How to make Ajax work for youSimon Willison
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)True-Vision
 
Instant and offline apps with Service Worker
Instant and offline apps with Service WorkerInstant and offline apps with Service Worker
Instant and offline apps with Service WorkerChang W. Doh
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsMaayan Glikser
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with CometSimon Willison
 
Going realtime with Socket.IO
Going realtime with Socket.IOGoing realtime with Socket.IO
Going realtime with Socket.IOChristian Joudrey
 

What's hot (20)

WebSockets with Spring 4
WebSockets with Spring 4WebSockets with Spring 4
WebSockets with Spring 4
 
Websocket protocol overview
Websocket protocol overviewWebsocket protocol overview
Websocket protocol overview
 
Using Websockets with Play!
Using Websockets with Play!Using Websockets with Play!
Using Websockets with Play!
 
Using Websockets in Play !
Using Websockets in Play !Using Websockets in Play !
Using Websockets in Play !
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! Framework
 
Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webgl
 
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
 
Single sign-on
Single sign-onSingle sign-on
Single sign-on
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
 
Connecting to Web Services on Android
Connecting to Web Services on AndroidConnecting to Web Services on Android
Connecting to Web Services on Android
 
How to make Ajax work for you
How to make Ajax work for youHow to make Ajax work for you
How to make Ajax work for you
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
 
Instant and offline apps with Service Worker
Instant and offline apps with Service WorkerInstant and offline apps with Service Worker
Instant and offline apps with Service Worker
 
Socket.IO
Socket.IOSocket.IO
Socket.IO
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSockets
 
Ajax Security
Ajax SecurityAjax Security
Ajax Security
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
 
Time for Comet?
Time for Comet?Time for Comet?
Time for Comet?
 
Going realtime with Socket.IO
Going realtime with Socket.IOGoing realtime with Socket.IO
Going realtime with Socket.IO
 

Viewers also liked

Sub Version Tools
Sub Version ToolsSub Version Tools
Sub Version Tools俊祺 邱
 
Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01Alex Kavanagh
 
TDD super mondays-june-2014
TDD super mondays-june-2014TDD super mondays-june-2014
TDD super mondays-june-2014Alex Kavanagh
 
SiDE Presentation by Prof. Paul Watson of Newcastle University
SiDE Presentation by Prof. Paul Watson of Newcastle UniversitySiDE Presentation by Prof. Paul Watson of Newcastle University
SiDE Presentation by Prof. Paul Watson of Newcastle UniversityAlex Kavanagh
 
SCM Migration Webinar - English
SCM Migration Webinar - EnglishSCM Migration Webinar - English
SCM Migration Webinar - EnglishCollabNet
 
TDD python ne-april-2014
TDD python ne-april-2014TDD python ne-april-2014
TDD python ne-april-2014Alex Kavanagh
 
Apples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and PythonApples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and PythonMurtaza Abbas
 
Scm With Mks Integrity
Scm With Mks IntegrityScm With Mks Integrity
Scm With Mks IntegrityRajesh Kumar
 

Viewers also liked (8)

Sub Version Tools
Sub Version ToolsSub Version Tools
Sub Version Tools
 
Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01Subversionn Introduction at SuperMondays 2009-09-01
Subversionn Introduction at SuperMondays 2009-09-01
 
TDD super mondays-june-2014
TDD super mondays-june-2014TDD super mondays-june-2014
TDD super mondays-june-2014
 
SiDE Presentation by Prof. Paul Watson of Newcastle University
SiDE Presentation by Prof. Paul Watson of Newcastle UniversitySiDE Presentation by Prof. Paul Watson of Newcastle University
SiDE Presentation by Prof. Paul Watson of Newcastle University
 
SCM Migration Webinar - English
SCM Migration Webinar - EnglishSCM Migration Webinar - English
SCM Migration Webinar - English
 
TDD python ne-april-2014
TDD python ne-april-2014TDD python ne-april-2014
TDD python ne-april-2014
 
Apples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and PythonApples and Oranges-- Introductory Comparison between PHP and Python
Apples and Oranges-- Introductory Comparison between PHP and Python
 
Scm With Mks Integrity
Scm With Mks IntegrityScm With Mks Integrity
Scm With Mks Integrity
 

Similar to Real time web (Orbited) at BCNE3

Comet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedComet web applications with Python, Django & Orbited
Comet web applications with Python, Django & Orbitedskam
 
Introduction to javaScript
Introduction to javaScriptIntroduction to javaScript
Introduction to javaScriptNeil Ghosh
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationDavid Calavera
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXHilary Mason
 
Apache Camel - WJax 2008
Apache Camel - WJax 2008Apache Camel - WJax 2008
Apache Camel - WJax 2008inovex GmbH
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSCarol McDonald
 
Lecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITPLecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITPyucefmerhi
 
IBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for MobileIBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for MobileChris Toohey
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioRick Copeland
 
Comet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedComet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedPyCon Italia
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Sergey Ilinsky
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Tatsuhiko Miyagawa
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overviewreybango
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moondavejohnson
 

Similar to Real time web (Orbited) at BCNE3 (20)

Comet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedComet web applications with Python, Django & Orbited
Comet web applications with Python, Django & Orbited
 
Jsp
JspJsp
Jsp
 
Introduction to javaScript
Introduction to javaScriptIntroduction to javaScript
Introduction to javaScript
 
GTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementationGTAC: AtomPub, testing your server implementation
GTAC: AtomPub, testing your server implementation
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
JWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAXJWU Guest Talk: JavaScript and AJAX
JWU Guest Talk: JavaScript and AJAX
 
Apache Camel - WJax 2008
Apache Camel - WJax 2008Apache Camel - WJax 2008
Apache Camel - WJax 2008
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
Lecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITPLecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITP
 
Ajax
AjaxAjax
Ajax
 
IBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for MobileIBM Lotus Notes Domino XPages and XPages for Mobile
IBM Lotus Notes Domino XPages and XPages for Mobile
 
Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.io
 
Comet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedComet web applications with Python, Django & Orbited
Comet web applications with Python, Django & Orbited
 
Widgets Tools Keynote
Widgets Tools KeynoteWidgets Tools Keynote
Widgets Tools Keynote
 
Grails and Dojo
Grails and DojoGrails and Dojo
Grails and Dojo
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
 
Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8Web Scraper Shibuya.pm tech talk #8
Web Scraper Shibuya.pm tech talk #8
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overview
 
DevDays09 Internet Explorer 8
DevDays09 Internet Explorer 8DevDays09 Internet Explorer 8
DevDays09 Internet Explorer 8
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moon
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
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
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
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
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Real time web (Orbited) at BCNE3

  • 1. Real Time Web Or having a socket in your browser Orbited, Django, MorbidQ “ideas2gather” Alex Kavanagh @ajkavanagh [email_address]
  • 3. There was this journey ...
  • 4. … so I agreed to do it (fairly large mistake)
  • 5. … so I agreed to do it (fairly large mistake)
  • 7. What I chose: Orbited & MorbidQ STOMP Django jQuery
  • 8. Orbited – Networking for the web http://orbited.org COMET
  • 9.  
  • 10.  
  • 11. Django: Full Stack Web Framework Python http:www.djangoproject.com
  • 12. STOMP http://stomp.codehaus.org/ The Stomp project is the Streaming Text Orientated Messaging Protocol site (or the Protocol Briefly Known as TTMP and Represented by the symbol :ttmp).
  • 13. jQuery Say no more (makes cross browser javascript work)
  • 14. ideas2gather (A real-time pledging system for Newcastle Council Health and Well-being Partnership event)
  • 15.  
  • 16. Stations machines and A Room display
  • 18.  
  • 20.  
  • 21. Code
  • 22. {% extends &quot;base.html&quot; %} {% block title%}idea2gather - '{{ event.name }}'{% endblock %} {% block script %} <link rel=&quot;stylesheet&quot; href=&quot;/static/css/site-wide.css&quot; type=&quot;text/css&quot; /> <meta name=&quot;channel&quot; content=&quot;/topic/{{ event.key }}&quot; /> <meta name=&quot;javascript-debug&quot; content=&quot;true&quot; /> <meta name=&quot;event-key&quot; content=&quot;{{ event.key}}&quot;/> <script>document.domain=document.domain</script> <script src=&quot;http://{{ orbited_host }}/static/Orbited.js&quot;></script> <script> Orbited.settings.port = 9000; TCPSocket = Orbited.TCPSocket; Orbited.settings.streaming = false; </script> <script src=&quot;http://{{ orbited_host }}/static/protocols/stomp/stomp.js&quot;></script>
  • 23. function setup_stomp(context, params) { // get our connection to the STOMP server var stomp = new STOMPClient(); stomp.onconnectedframe = function() { stomp.ready = true; stomp.subscribe(context.CHANNEL); setTimeout(params.connect_function, 4000); }; // set up the receive function. stomp.onmessageframe = function(frame) { params.receive_function( frame ); }; ...
  • 24. ... var logger = Orbited.getLogger(&quot;example&quot;); var reconnectTimer = null; stomp.onopen = function() { if(reconnectTimer) window.clearTimeout(reconnectTimer); }; stomp.onclose = function(c) { logger.debug('Lost Connection, Code: ' + c); reconnectTimer = window.setTimeout( function () { params.reconnect(context); }, 1000); // TODO: autoincrease with cap }; stomp.connect(document.domain, 61613); //, 'guest', 'guest'); return stomp; }
  • 26. IE (6,7,8) ALL different behaviours