SlideShare a Scribd company logo
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

More Related Content

What's hot

Node.js by Alex and Nalin
Node.js by Alex and NalinNode.js by Alex and Nalin
Node.js by Alex and Nalin
Tagged Social
 
402 @ Mobile next
402 @ Mobile next402 @ Mobile next
402 @ Mobile next
Felix Crisan
 
Introduction to Bitcoin for programmers
Introduction to Bitcoin for programmersIntroduction to Bitcoin for programmers
Introduction to Bitcoin for programmers
Wojciech 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 2
Wojciech Langiewicz
 
Big(data) in block(chains)
Big(data) in block(chains)Big(data) in block(chains)
Big(data) in block(chains)
Felix Crisan
 
Hands on with multichain
Hands on with multichainHands on with multichain
Hands on with multichain
Roderik van der Veer
 
Bitcoin: introduction for programmers - Pecha Kucha
Bitcoin:   introduction for programmers - Pecha KuchaBitcoin:   introduction for programmers - Pecha Kucha
Bitcoin: introduction for programmers - Pecha Kucha
Wojciech Langiewicz
 
Blockchain event 01
Blockchain event 01Blockchain event 01
Blockchain event 01
SeyyedAmirFatemiAmin
 
WSO2 Presentation Layer
WSO2 Presentation LayerWSO2 Presentation Layer
WSO2 Presentation Layer
Nuwan 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 EN
imrMlechner
 
Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchains
Dmitry Meshkov
 
SMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillageSMIMP Lightning Talk - DEFCON CryptoVillage
SMIMP Lightning Talk - DEFCON CryptoVillage
Adam Caudill
 
Ethereum overview
Ethereum overviewEthereum overview
Ethereum overview
Alexander (Alex) Komyagin
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
Akshay 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 space
Michał Załęcki
 
Information security in private blockchains
Information security in private blockchainsInformation security in private blockchains
Information security in private blockchains
Coin 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 Vaghela
PriyankVaghela
 
Blockchain in Bioinformatics
Blockchain in BioinformaticsBlockchain in Bioinformatics
Blockchain in Bioinformatics
Accubits Technologies
 
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
Tim Cunningham
 

What's hot (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
 

Viewers also liked

UX, UI, WTF
UX, UI, WTFUX, UI, WTF
UX, UI, WTF
Dustin Williams
 
django_reference_sheet
django_reference_sheetdjango_reference_sheet
django_reference_sheet
webuploader
 
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 2012
Gigaom
 
The laddo project
The laddo projectThe laddo project
The laddo project
Jaskeerat Bedi
 
Django Worst Practices
Django Worst PracticesDjango Worst Practices
Django Worst Practices
Daniel Greenfeld
 

Viewers also liked (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
 

Similar to Django ws

HWIOS Websocket CMS explained
HWIOS Websocket CMS explainedHWIOS Websocket CMS explained
HWIOS Websocket CMS explained
phrearch
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
Ron Reiter
 
Real time web_apps_pycon2012-v1
Real time web_apps_pycon2012-v1Real time web_apps_pycon2012-v1
Real time web_apps_pycon2012-v1
Avinash 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.
 
Node.js scaling in highload
Node.js scaling in highloadNode.js scaling in highload
Node.js scaling in highload
Timur Shemsedinov
 
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
barciszewski
 
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.js
Rody Middelkoop
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applications
Tom Martin
 
JUG louvain websockets
JUG louvain websocketsJUG louvain websockets
JUG louvain websockets
Marc Tritschler
 
Distributed, Real-time Web Apps
Distributed, Real-time Web AppsDistributed, Real-time Web Apps
Distributed, Real-time Web Apps
Docker, 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 Persistence
FIWARE
 
Introduction to Web Sockets
Introduction to Web SocketsIntroduction to Web Sockets
Introduction to Web Sockets
Jumping 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 HungerStation
ArabNet 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 Cryptography
Kevin Hakanson
 
Node js - Yns
Node js - YnsNode js - Yns
Node js - Yns
Alex Amistad
 
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
Naresh Chintalcheru
 

Similar to 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
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 

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