SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
Django WS
Building Single-page web-applications with Django,
            Twisted and TxWebsocket


                  Jeroen van Veen
Websockets?
● Persistent TCP connection browser-server
● Data exchange
  ○ Handshake protocol (currently Hybi-16)
  ○ Both UTF-8-encoded & binary data
  ○ Low latency, no headers
  ○ Easy serializing with JSON
● Support
  ○ Python: TxWebsocket, Autobahn WS, Gevent-websocket
  ○ Browser: Chrome, Firefox, Opera, Safari, IE10
  ○ Browser fallback: Flash Websocket
Multi-page
    VS
Single-page
Bootstrapping
● Each url routes initially to the HTML/JS bootstrap view
● The websocket connection is initialized
● During the handshake, the sessionid cookie is being
  reused
● Set transport.user and add the transport to the client
  Pool
● Signals are used to notify listening code for events like
  connect, disconnect, view_changed, etc.
● The navigation-bar URL is routed through the javascript
  application and gets the appropriate content
URL Routing
●   Mimick Django URL routing serverside
●   And clientside...
●   XRegexp for named group support
●   Usable with HTML5 history API
●   Capture link click events
●   Client URL tracking and signalling
Django-WS
● Django authentication during handshake with session
  cookie
● Client transport pool handling
● Event subscription (f.i. client connect,disconnect)
● Websocket URL-routing protocol
● Twisted MultiFile for static resources & management
  commands to integrate Twisted in Django
● dws namespace, seperate python modules
● Clientside RequireJS modules
● BSD license
In development
● Django-ws modules: core, misc, blog, wiki
● Narrowcaster
● ...
Challenges
● Integrate further with Django
   ○ Use existing conventions where possible
   ○ Compatibility modus for HTTP-based Django apps
● Cleanup design
● Proper documentation
● Usable reference Websocket CMS
● Community
● SEO
Questions?


                          Code
       https://github.com/phrearch/django-ws-core

                          Contact
                  vanveen@gw20e.com
         https://twitter.com/#!/jeroen_van_veen

Contenu connexe

Tendances

Node.js by Alex and Nalin
Node.js by Alex and NalinNode.js by Alex and Nalin
Node.js by Alex and NalinTagged Social
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmersWojciech Langiewicz
 
Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Wojciech Langiewicz
 
Big(data) in block(chains)
Big(data) in block(chains)Big(data) in block(chains)
Big(data) in block(chains)Felix Crisan
 
Bitcoin: introduction for programmers - Pecha Kucha
Bitcoin:   introduction for programmers - Pecha KuchaBitcoin:   introduction for programmers - Pecha Kucha
Bitcoin: introduction for programmers - Pecha KuchaWojciech Langiewicz
 
WSO2 Presentation Layer
WSO2 Presentation LayerWSO2 Presentation Layer
WSO2 Presentation LayerNuwan Bandara
 
wmsbox in medias res Lechner Vortrag EN
wmsbox in medias res Lechner Vortrag ENwmsbox in medias res Lechner Vortrag EN
wmsbox in medias res Lechner Vortrag ENimrMlechner
 
Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchainsDmitry Meshkov
 
SMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillageSMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillageAdam Caudill
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to BlockchainAkshay Kumar
 
How does the Bitcoin network work?
How does the Bitcoin network work?How does the Bitcoin network work?
How does the Bitcoin network work?Akshay Kumar
 
How your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain spaceHow your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain spaceMichał Załęcki
 
Information security in private blockchains
Information security in private blockchainsInformation security in private blockchains
Information security in private blockchainsCoin Sciences Ltd
 
Blockchain Technology - The Next Superpower By Priyank Vaghela
Blockchain Technology - The Next Superpower By Priyank VaghelaBlockchain Technology - The Next Superpower By Priyank Vaghela
Blockchain Technology - The Next Superpower By Priyank VaghelaPriyankVaghela
 
Let web sockets hit that f5 for you
Let web sockets hit that f5 for youLet web sockets hit that f5 for you
Let web sockets hit that f5 for youTim Cunningham
 

Tendances (20)

Node.js by Alex and Nalin
Node.js by Alex and NalinNode.js by Alex and Nalin
Node.js by Alex and Nalin
 
402 @ Mobile next
402 @ Mobile next402 @ Mobile next
402 @ Mobile next
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
 
Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2Bitcoin for programmers - part 1 version 2
Bitcoin for programmers - part 1 version 2
 
Big(data) in block(chains)
Big(data) in block(chains)Big(data) in block(chains)
Big(data) in block(chains)
 
Hands on with multichain
Hands on with multichainHands on with multichain
Hands on with multichain
 
Bitcoin: introduction for programmers - Pecha Kucha
Bitcoin:   introduction for programmers - Pecha KuchaBitcoin:   introduction for programmers - Pecha Kucha
Bitcoin: introduction for programmers - Pecha Kucha
 
Blockchain event 01
Blockchain event 01Blockchain event 01
Blockchain event 01
 
WSO2 Presentation Layer
WSO2 Presentation LayerWSO2 Presentation Layer
WSO2 Presentation Layer
 
wmsbox in medias res Lechner Vortrag EN
wmsbox in medias res Lechner Vortrag ENwmsbox in medias res Lechner Vortrag EN
wmsbox in medias res Lechner Vortrag EN
 
Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchains
 
SMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillageSMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillage
 
Ethereum overview
Ethereum overviewEthereum overview
Ethereum overview
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
How does the Bitcoin network work?
How does the Bitcoin network work?How does the Bitcoin network work?
How does the Bitcoin network work?
 
How your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain spaceHow your JavaScript skills apply in the blockchain space
How your JavaScript skills apply in the blockchain space
 
Information security in private blockchains
Information security in private blockchainsInformation security in private blockchains
Information security in private blockchains
 
Blockchain Technology - The Next Superpower By Priyank Vaghela
Blockchain Technology - The Next Superpower By Priyank VaghelaBlockchain Technology - The Next Superpower By Priyank Vaghela
Blockchain Technology - The Next Superpower By Priyank Vaghela
 
Blockchain in Bioinformatics
Blockchain in BioinformaticsBlockchain in Bioinformatics
Blockchain in Bioinformatics
 
Let web sockets hit that f5 for you
Let web sockets hit that f5 for youLet web sockets hit that f5 for you
Let web sockets hit that f5 for you
 

En vedette

django_reference_sheet
django_reference_sheetdjango_reference_sheet
django_reference_sheetwebuploader
 
Online marketing channels
Online marketing channelsOnline marketing channels
Online marketing channelsPradeep Kumar
 
BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012
BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012
BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012Gigaom
 

En vedette (7)

UX, UI, WTF
UX, UI, WTFUX, UI, WTF
UX, UI, WTF
 
django_reference_sheet
django_reference_sheetdjango_reference_sheet
django_reference_sheet
 
Ppc glossary
Ppc glossaryPpc glossary
Ppc glossary
 
Online marketing channels
Online marketing channelsOnline marketing channels
Online marketing channels
 
BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012
BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012
BACK TO THE FUTURE: DATAFLOW FINALLY COMES OF AGE from Structure 2012
 
The laddo project
The laddo projectThe laddo project
The laddo project
 
Django Worst Practices
Django Worst PracticesDjango Worst Practices
Django Worst Practices
 

Similaire à Django ws

HWIOS Websocket CMS explained
HWIOS Websocket CMS explainedHWIOS Websocket CMS explained
HWIOS Websocket CMS explainedphrearch
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
Real time web_apps_pycon2012-v1
Real time web_apps_pycon2012-v1Real time web_apps_pycon2012-v1
Real time web_apps_pycon2012-v1Avinash Prasad
 
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Corey Clark, Ph.D.
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Toolsbarciszewski
 
The History and Status of Web Crypto API (2012)
The History and Status of Web Crypto API (2012)The History and Status of Web Crypto API (2012)
The History and Status of Web Crypto API (2012)Channy Yun
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)Ericom Software
 
JavaScript on the server - Node.js
JavaScript on the server - Node.jsJavaScript on the server - Node.js
JavaScript on the server - Node.jsRody Middelkoop
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applicationsTom Martin
 
Distributed, Real-time Web Apps
Distributed, Real-time Web AppsDistributed, Real-time Web Apps
Distributed, Real-time Web AppsDocker, Inc.
 
dotCloud presents Stack.io
dotCloud presents Stack.io dotCloud presents Stack.io
dotCloud presents Stack.io dotCloud
 
FIWARE Wednesday Webinars - Strategies for Context Data Persistence
FIWARE Wednesday Webinars - Strategies for Context Data PersistenceFIWARE Wednesday Webinars - Strategies for Context Data Persistence
FIWARE Wednesday Webinars - Strategies for Context Data PersistenceFIWARE
 
Introduction to Web Sockets
Introduction to Web SocketsIntroduction to Web Sockets
Introduction to Web SocketsJumping Bean
 
What's New in NGINX Plus R10?
What's New in NGINX Plus R10?What's New in NGINX Plus R10?
What's New in NGINX Plus R10?NGINX, Inc.
 
Design Web Service API by HungerStation
Design Web Service API by HungerStationDesign Web Service API by HungerStation
Design Web Service API by HungerStationArabNet ME
 
Developer's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web CryptographyDeveloper's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web CryptographyKevin Hakanson
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsNaresh Chintalcheru
 

Similaire à Django ws (20)

HWIOS Websocket CMS explained
HWIOS Websocket CMS explainedHWIOS Websocket CMS explained
HWIOS Websocket CMS explained
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Real time web_apps_pycon2012-v1
Real time web_apps_pycon2012-v1Real time web_apps_pycon2012-v1
Real time web_apps_pycon2012-v1
 
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
Building a Multithreaded Web-Based Game Engine Using HTML5/CSS3 and JavaScrip...
 
Node.js scaling in highload
Node.js scaling in highloadNode.js scaling in highload
Node.js scaling in highload
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Tools
 
The History and Status of Web Crypto API (2012)
The History and Status of Web Crypto API (2012)The History and Status of Web Crypto API (2012)
The History and Status of Web Crypto API (2012)
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
JavaScript on the server - Node.js
JavaScript on the server - Node.jsJavaScript on the server - Node.js
JavaScript on the server - Node.js
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applications
 
JUG louvain websockets
JUG louvain websocketsJUG louvain websockets
JUG louvain websockets
 
Distributed, Real-time Web Apps
Distributed, Real-time Web AppsDistributed, Real-time Web Apps
Distributed, Real-time Web Apps
 
dotCloud presents Stack.io
dotCloud presents Stack.io dotCloud presents Stack.io
dotCloud presents Stack.io
 
FIWARE Wednesday Webinars - Strategies for Context Data Persistence
FIWARE Wednesday Webinars - Strategies for Context Data PersistenceFIWARE Wednesday Webinars - Strategies for Context Data Persistence
FIWARE Wednesday Webinars - Strategies for Context Data Persistence
 
Introduction to Web Sockets
Introduction to Web SocketsIntroduction to Web Sockets
Introduction to Web Sockets
 
What's New in NGINX Plus R10?
What's New in NGINX Plus R10?What's New in NGINX Plus R10?
What's New in NGINX Plus R10?
 
Design Web Service API by HungerStation
Design Web Service API by HungerStationDesign Web Service API by HungerStation
Design Web Service API by HungerStation
 
Developer's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web CryptographyDeveloper's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web Cryptography
 
Node js - Yns
Node js - YnsNode js - Yns
Node js - Yns
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using Websockets
 

Dernier

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Django ws

  • 1. Django WS Building Single-page web-applications with Django, Twisted and TxWebsocket Jeroen van Veen
  • 2. Websockets? ● Persistent TCP connection browser-server ● Data exchange ○ Handshake protocol (currently Hybi-16) ○ Both UTF-8-encoded & binary data ○ Low latency, no headers ○ Easy serializing with JSON ● Support ○ Python: TxWebsocket, Autobahn WS, Gevent-websocket ○ Browser: Chrome, Firefox, Opera, Safari, IE10 ○ Browser fallback: Flash Websocket
  • 3. Multi-page VS Single-page
  • 4. Bootstrapping ● Each url routes initially to the HTML/JS bootstrap view ● The websocket connection is initialized ● During the handshake, the sessionid cookie is being reused ● Set transport.user and add the transport to the client Pool ● Signals are used to notify listening code for events like connect, disconnect, view_changed, etc. ● The navigation-bar URL is routed through the javascript application and gets the appropriate content
  • 5. URL Routing ● Mimick Django URL routing serverside ● And clientside... ● XRegexp for named group support ● Usable with HTML5 history API ● Capture link click events ● Client URL tracking and signalling
  • 6.
  • 7. Django-WS ● Django authentication during handshake with session cookie ● Client transport pool handling ● Event subscription (f.i. client connect,disconnect) ● Websocket URL-routing protocol ● Twisted MultiFile for static resources & management commands to integrate Twisted in Django ● dws namespace, seperate python modules ● Clientside RequireJS modules ● BSD license
  • 8. In development ● Django-ws modules: core, misc, blog, wiki ● Narrowcaster ● ...
  • 9. Challenges ● Integrate further with Django ○ Use existing conventions where possible ○ Compatibility modus for HTTP-based Django apps ● Cleanup design ● Proper documentation ● Usable reference Websocket CMS ● Community ● SEO
  • 10. Questions? Code https://github.com/phrearch/django-ws-core Contact vanveen@gw20e.com https://twitter.com/#!/jeroen_van_veen