SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
HWIOS




              
     http://hwios.org
About


       
General information
    ●   Started in 2009
    ●   2 years of 1 FTE development so far
    ●   Python based
    ●   LGPL license
    ●   HTML5 browser engines only
    ●   Tested on Chromium/Chrome




                                     
Concepts
    ●   Realtime multi user interaction
    ●   Presence 
    ●   Activity awareness
    ●   Realtime collaboration
    ●   Requested & pushed data
    ●   Bookmarking/sharing of websocket resources
    ●   Networked GUI for other services




                                    
Application modules
    ●   Messenger
        Chat, Activity, link invite, Whois
    ●   Profiles
        profile management, register/login, details
    ●   Wiki: 
        Collaborative editing, history, wiki links visualisation
    ●   Blog: 
        WYSIWYG, comments, file manager
    ●   Teknon 
        distributed service management
    ●   Pages
        Collaborative editing custom CMS pages (development)
    ●   Slide
        Collaborative drawing, approach to slideshow co­creation (development)



                                                    
Framework
    ●   Build on top of Twisted & Django
    ●   PyPy JIT compatible
    ●   Lightweight JSON url routing protocol
    ●   Flexible regex based URL handling client/server side
    ●   JS/Py event observing for common events
    ●   View tracking & navigation bar URL support
    ●   I18n user specific language support
    ●   Jquery & friends
    ●   Consistent UI widgets, based on Jquery UI 
    ●   RequireJS modules & optimization workflow
    ●   Structured sphinx documentation



                                      
Realtime Suitability


               
Transport considerations
    TCP Connect                                                  TCP Disconnect
                                      SYN                                                      FIN,ACK
        Step 1: Browser                            Server          Step 1: Browser                              Server
                                  SYN, ACK                                                        ACK
        Step 2: Browser                            Server          Step 2: Browser                              Server
                                      ACK                                                      FIN,ACK
        Step 3: Browser                            Server          Step 3: Browser                              Server
                                     DATA                                                         ACK
        Step 4: Browser                            Server          Step 4: Browser                              Server

    HTTP request/response:                                        Persistent websocket connection: 
    1. TCP Connect                                                1. TCP Connect
    2. Send data to browser                                       ● Send/receive data from/to browser


    3. Receive data from server                                   ● Send/receive data from/to server


    4. TCP Disconnect                                             ● ...TCP Disconnect


    ●    Each HTTP request requires more packet traffic, due to connect and disconnect, which increases latency 
         compared to a persistent connection.
    ●    HTTP is very useful for it's original purpose; fast and efficient traffic of data between a web of HTTP servers 
         and the user browser.
    ●    HTTP has a relatively high latency, header data overhead and a rigid flow order of data, which makes it less 
         efficient for realtime web applications that rely on bidirectional communication and sending frequent, small 
         data updates.
    ●    Realtime web­applications benefit from a hybrid approach, where JSON formatted data flows through a 
                                                                   
         websocket connection, and web resources like image/css/js files are retrieved with HTTP 
         using the browser DOM parser.
CMS dataflow chart
Multi page HTTP CMS                                          Single page WS CMS
       Process            HTTP Request      Render                 Process            HTTP Request    Render 
      Navbar URL                            main tpl              Navbar URL                        bootstrap tpl
                          HTTP Response                                               HTTP Response
                                          Image/CSS/JS                                                                    Image/CSS/JS
         DOM             HTTP                                          DOM                       HTTP
                                            Resources                                                                       Resources
                         HTTP                                                                    HTTP
          CSS            HTTP                                          CSS                       HTTP
                                            Process                                                                          Process
                      HTTP (XHR)
                                          XHR request                                                                       WS request
           JS                                                            JS
     User Interface                                           User Interface                                                   Process
                                                                                                                               WS push
                                                                                                          WS(HRM)                                                            
       Click URL                                                   Click URL

                                                             JS                                                                                          WS(HRM)
                                                                                                    WS request
                                                                                                                                       WS(HRM)
                                                                  URL Router
                                                                                                     function

                                                                 Navbar
                                                                                                     WS Router
                                                               History API

                                                                                                     WS Router


                                                          
                                                              WS method                             WS request
                                                               (push)                                function
Websocket Routing Protocol
    HWIOS Remote Messaging (HRM)
    Client request
    ws.remote(url,params,callback);
    ws.remote('/messenger/messages/send/',{msg:$('.msg­input').val(),to:$('.sel­user').data('id')}, function(response){});
    JSON data: [method,params,callback_uuid]


    Client response
    JSON data: [params, callback_uuid]


    Server request
    Client.remote(url, params) 
    client.remote('/messenger/messages/private/add/', {'msg':msg_from_usr,'from':src_client.profile.username})


    Server response
    Not available yet.




                                                             
Multi page HTTP CMS
    ●   Local links trigger a full page reload
    ●   JS state is lost after a full page reload
    ●   XHR transport for limited dynamic page updates
    ●   HTTP header overhead and high TCP latency 
    ●   Emphasis on website as a collection of html documents
    ●   SEO well supported
    ●   Client/server request/response model




                                      
Single page websocket CMS
    ●   Local links are routed to clientside functions
    ●   Javascript state is maintained
    ●   Websocket transport for all dynamic page updates
    ●   Lightweight JSON protocol and low TCP latency 
    ●   Emphasis on website as an application
    ●   No SEO; crawlers can't access websocket resources yet
    ●   Bidirectional client/server request/response model




                                     
Developing with HWIOS
    ●   Why HWIOS?
        Clean code base
        Good performance
        Intuitive URL based routing system
        Sphinx documentation
        Low learning curve for Django/Python developers
        DRY; two years of R&D for free
        Lots of existing web­applications
        LGPL license permits proprietary modules
        Built on top of solid frameworks like Python, Twisted, Django and JQuery
    ●   Why Python?
        Speed; CPython is faster, more flexible than PHP. PyPy JIT is at least as fast as Node.js 
        Rich ecosystem; Python exists since 1991, Node.js since 2009
    ●   Why Twisted?
        Fast, well tested and flexible async internet server platform
        Rich ecosystem: lots of ready to use server technology
    ●   Why Django?
        Well documented, maintained, tested and feature rich web framework
        Rich ecosystem: Lots of snippets can easily be adapted to work with websockets instead of HTTP
    ●   Why Jquery?
        Well documented, maintained and tested
        Easy DOM manipulation
        JQuery UI
                                                              
Questions?


          
Information channels
    ●   Feel free to ask!
    ●   Check out community site http://hwios.org
    ●   Read the documentation http://hwios.org/docs/
    ●   Code: https://github.com/os­networks/HWIOS
    ●   Support: #hwios @ irc.freenode.net 
    ●   Contact OS­Networks: info@os­networks.net




                                     

Contenu connexe

Similaire à HWIOS Websocket CMS explained

Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworksukdpe
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Serverwebhostingguy
 
Jsp & Ajax
Jsp & AjaxJsp & Ajax
Jsp & AjaxAng Chen
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with javaJeongHun Byeon
 
Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...
Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...
Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...Lucas Jellema
 
Connected Web Systems
Connected Web SystemsConnected Web Systems
Connected Web SystemsDamir Dobric
 
Windows Azure架构探析
Windows Azure架构探析Windows Azure架构探析
Windows Azure架构探析George Ang
 
Web development: Why do we need it ?
Web development: Why do we need it ?Web development: Why do we need it ?
Web development: Why do we need it ?anubhavdoodleblue123
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)Saltlux zinyus
 
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)zinyus
 
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)Carles Farré
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web ArchitectureChamnap Chhorn
 
Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01Maisha Price
 
Server Side Programming
Server Side ProgrammingServer Side Programming
Server Side ProgrammingMilan Thapa
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web ServicesAngelin R
 

Similaire à HWIOS Websocket CMS explained (20)

Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
 
Internet GIS
Internet GISInternet GIS
Internet GIS
 
Jsp & Ajax
Jsp & AjaxJsp & Ajax
Jsp & Ajax
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with java
 
Web Browsers.pptx
Web Browsers.pptxWeb Browsers.pptx
Web Browsers.pptx
 
Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...
Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...
Don't call us - we'll push - on cross tier push architecture (NLJUG JFall 201...
 
Connected Web Systems
Connected Web SystemsConnected Web Systems
Connected Web Systems
 
Web server
Web serverWeb server
Web server
 
Wcf
WcfWcf
Wcf
 
Windows Azure架构探析
Windows Azure架构探析Windows Azure架构探析
Windows Azure架构探析
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Web development: Why do we need it ?
Web development: Why do we need it ?Web development: Why do we need it ?
Web development: Why do we need it ?
 
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
 
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
전문가 토크릴레이 1탄 html5 전망 (전종홍 박사)
 
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
[DSBW Spring 2009] Unit 02: Web Technologies (1/2)
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01Introductiontowebarchitecture 090922221506-phpapp01
Introductiontowebarchitecture 090922221506-phpapp01
 
Server Side Programming
Server Side ProgrammingServer Side Programming
Server Side Programming
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web Services
 

Dernier

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
 
[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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Dernier (20)

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
 
[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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

HWIOS Websocket CMS explained

  • 1. HWIOS     http://hwios.org
  • 2. About    
  • 3. General information ● Started in 2009 ● 2 years of 1 FTE development so far ● Python based ● LGPL license ● HTML5 browser engines only ● Tested on Chromium/Chrome    
  • 4. Concepts ● Realtime multi user interaction ● Presence  ● Activity awareness ● Realtime collaboration ● Requested & pushed data ● Bookmarking/sharing of websocket resources ● Networked GUI for other services    
  • 5. Application modules ● Messenger Chat, Activity, link invite, Whois ● Profiles profile management, register/login, details ● Wiki:  Collaborative editing, history, wiki links visualisation ● Blog:  WYSIWYG, comments, file manager ● Teknon  distributed service management ● Pages Collaborative editing custom CMS pages (development) ● Slide Collaborative drawing, approach to slideshow co­creation (development)    
  • 6. Framework ● Build on top of Twisted & Django ● PyPy JIT compatible ● Lightweight JSON url routing protocol ● Flexible regex based URL handling client/server side ● JS/Py event observing for common events ● View tracking & navigation bar URL support ● I18n user specific language support ● Jquery & friends ● Consistent UI widgets, based on Jquery UI  ● RequireJS modules & optimization workflow ● Structured sphinx documentation    
  • 8. Transport considerations TCP Connect TCP Disconnect SYN FIN,ACK Step 1: Browser Server Step 1: Browser Server SYN, ACK ACK Step 2: Browser Server Step 2: Browser Server ACK FIN,ACK Step 3: Browser Server Step 3: Browser Server DATA ACK Step 4: Browser Server Step 4: Browser Server HTTP request/response:  Persistent websocket connection:  1. TCP Connect 1. TCP Connect 2. Send data to browser ● Send/receive data from/to browser 3. Receive data from server ● Send/receive data from/to server 4. TCP Disconnect ● ...TCP Disconnect ● Each HTTP request requires more packet traffic, due to connect and disconnect, which increases latency  compared to a persistent connection. ● HTTP is very useful for it's original purpose; fast and efficient traffic of data between a web of HTTP servers  and the user browser. ● HTTP has a relatively high latency, header data overhead and a rigid flow order of data, which makes it less  efficient for realtime web applications that rely on bidirectional communication and sending frequent, small  data updates. ● Realtime web­applications benefit from a hybrid approach, where JSON formatted data flows through a      websocket connection, and web resources like image/css/js files are retrieved with HTTP  using the browser DOM parser.
  • 9. CMS dataflow chart Multi page HTTP CMS Single page WS CMS Process  HTTP Request Render  Process  HTTP Request Render  Navbar URL main tpl Navbar URL bootstrap tpl                HTTP Response                HTTP Response Image/CSS/JS Image/CSS/JS DOM HTTP DOM HTTP Resources Resources HTTP HTTP CSS HTTP CSS HTTP Process Process HTTP (XHR) XHR request WS request JS JS User Interface User Interface Process WS push                                         WS(HRM)                                                             Click URL Click URL JS                                        WS(HRM) WS request                                 WS(HRM) URL Router function Navbar WS Router History API WS Router     WS method WS request (push) function
  • 10. Websocket Routing Protocol HWIOS Remote Messaging (HRM) Client request ws.remote(url,params,callback); ws.remote('/messenger/messages/send/',{msg:$('.msg­input').val(),to:$('.sel­user').data('id')}, function(response){}); JSON data: [method,params,callback_uuid] Client response JSON data: [params, callback_uuid] Server request Client.remote(url, params)  client.remote('/messenger/messages/private/add/', {'msg':msg_from_usr,'from':src_client.profile.username}) Server response Not available yet.    
  • 11. Multi page HTTP CMS ● Local links trigger a full page reload ● JS state is lost after a full page reload ● XHR transport for limited dynamic page updates ● HTTP header overhead and high TCP latency  ● Emphasis on website as a collection of html documents ● SEO well supported ● Client/server request/response model    
  • 12. Single page websocket CMS ● Local links are routed to clientside functions ● Javascript state is maintained ● Websocket transport for all dynamic page updates ● Lightweight JSON protocol and low TCP latency  ● Emphasis on website as an application ● No SEO; crawlers can't access websocket resources yet ● Bidirectional client/server request/response model    
  • 13. Developing with HWIOS ● Why HWIOS? Clean code base Good performance Intuitive URL based routing system Sphinx documentation Low learning curve for Django/Python developers DRY; two years of R&D for free Lots of existing web­applications LGPL license permits proprietary modules Built on top of solid frameworks like Python, Twisted, Django and JQuery ● Why Python? Speed; CPython is faster, more flexible than PHP. PyPy JIT is at least as fast as Node.js  Rich ecosystem; Python exists since 1991, Node.js since 2009 ● Why Twisted? Fast, well tested and flexible async internet server platform Rich ecosystem: lots of ready to use server technology ● Why Django? Well documented, maintained, tested and feature rich web framework Rich ecosystem: Lots of snippets can easily be adapted to work with websockets instead of HTTP ● Why Jquery? Well documented, maintained and tested Easy DOM manipulation JQuery UI    
  • 15. Information channels ● Feel free to ask! ● Check out community site http://hwios.org ● Read the documentation http://hwios.org/docs/ ● Code: https://github.com/os­networks/HWIOS ● Support: #hwios @ irc.freenode.net  ● Contact OS­Networks: info@os­networks.net