SlideShare une entreprise Scribd logo
1  sur  20
Open CF Summit 2012
Billy Cravens
   Billy Cravens
   ColdFusion since 4.0 (1999)
   Houston CFUG manager
   Former DFWCFUG board member
   Other languages: PHP, .NET; node.js ninja in
    training
   Remember the Wrox book?
   Supporter of Cystic Fibrosis
     www.CureCF.com
   Full-blown training on WebSockets
   Limited to only open source engines
   A spectacular demo – we’ll look at bare bones
    chat implementation
     “I hate chat app examples”
                   - Ray Camden
   In-depth knowledge of OSS roadmaps
   An overview of options in all available CFML
    engines
   Highlight the role of open source solutions
    across this entire space
   A review of the landscape on February 25,
    2012
   Polling
   Long-polling / Comet
   Flash
   What are they?
     ▪ Bi-directional, full duplex TCP communication in the
       browser
     ▪ Not finalized – multiple versions
     ▪ ws(s)://serviceURI(:port)(/optional/path)
     ▪ Client side: JavaScript
   Support
     Browsers that support WebSockets
      ▪ IE 10+, FF 6+, Chrome 14+, iOS 4.2+, BB OS7
     Using Flash and JavaScript as polyfill
      ▪ https://github.com/gimite/web-socket-js
      ▪ The code
   node.js/socket.io
     WebSockets + evented JavaScript
     Complexity
   PusherApp
     Hosted service
     Dependent
   ColdFusion < v.10
   Railo
   Open BlueDragon
   https://github.com/nmische/cf-websocket-
    gateway

   Built on Netty, non-blocking IO framework
    for Java (similar to node.js)
   Built on Webbit, a Java WebSocket server
   Event gateway
     Copy JARs and restart ColdFusion
     Configure gateway type
     Configure gateway instance
     Create CFC with WebSocket methods
      ▪ Open Connection
      ▪ Close Connection
      ▪ Incoming Message
   Event gateway
     Railo allows for gateways types to be written in
      CFML (ACF=Java)
     Railo has extension API: add gateways, libraries,
      etc, via Admin
     Gateway based on lightweight WebSockets server
      ▪ https://github.com/TooTallNate/Java-WebSocket
   More info
     ▪ http://wiki.getrailo.org/wiki/Extensions:WebSockets_Ga
       teway
   I encountered some errors
     You can report – fast to respond
     You can fix – gateway is in CFML
     Install script is CFML – you can troubleshoot
   I almost made it work
     fix code in install.cfc:
      (railo-root)/WEB-INF/railo/temp/compress/(random
      string)/(UUID)/railo/install.cfc
       ▪ *** didn’t work ***
     manual copy
       ▪ (railo-root)/WEB-INF/railo/temp/compress/(random string)/(UUID)/railo
         WebSocket.cfc and WebSocketListener.cfc
         to (railo-root)/WEB-INF/railo/components/railo/extension/gateway/
       ▪ Then restart
       ▪ Still no WebSocket option in gateways screen
     Moved WebSocketGateway.cfc from (railo root)/WEB-
      INF/railo/context/admin/cdriver to …../gdriver
       ▪ Restarted - this fixed it

     Had to add mapping to components/railo directory
   On to the code ….
   Current release (2.02) added socket functions
   Not so fast …
     Raw TCP Sockets, not WebSockets
     
   Options
     craft handshake yourself
     Use a wrapper:
      https://github.com/kanaka/websockify
     Write a wrapper: tiny little node.js script
   Simple WebSockets support
   Configuration: CF Admin > Server Setting >
    WebSocket
     Port: for WS client
     Socket Timeout
     Max Data Size: default OK for most apps
     Start Flash Policy Server: for Flash fallback
   The code
   Advantages
     Little code
     More open than other approaches (Flash, Blaze
      DS, etc)
   Disadvantages
     Little analysis of the guts
     Beta 1 – probably summer before gold
     Commercial product

Contenu connexe

Tendances

Timeless - Websocket on Rails
Timeless - Websocket on RailsTimeless - Websocket on Rails
Timeless - Websocket on RailsFramgia Vietnam
 
T3DD12 Caching with Varnish
T3DD12 Caching with VarnishT3DD12 Caching with Varnish
T3DD12 Caching with VarnishAOE
 
Rails hosting
Rails hostingRails hosting
Rails hostingwonko
 
Using WebSockets with ColdFusion
Using WebSockets with ColdFusionUsing WebSockets with ColdFusion
Using WebSockets with ColdFusioncfjedimaster
 
Sonata Block Bundle - sfPot March 2014
Sonata Block Bundle - sfPot March 2014Sonata Block Bundle - sfPot March 2014
Sonata Block Bundle - sfPot March 2014th0masr
 
meet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakemeet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakeMax Małecki
 
Geeky Academy Week 3 :: Vagrant + Puppet
Geeky Academy Week 3 :: Vagrant + PuppetGeeky Academy Week 3 :: Vagrant + Puppet
Geeky Academy Week 3 :: Vagrant + PuppetSomkiat Puisungnoen
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsAlessandro Pilotti
 
DEV301- Web Service Programming with WCF 3.5
DEV301- Web Service Programming with WCF 3.5DEV301- Web Service Programming with WCF 3.5
DEV301- Web Service Programming with WCF 3.5Eyal Vardi
 
An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony Roel Sint
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packagertechmemo
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packagertechmemo
 
Smuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTPSmuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTPDávid Halász
 
BackPAN Archeology
BackPAN ArcheologyBackPAN Archeology
BackPAN Archeologybrian d foy
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010sullis
 

Tendances (20)

Timeless - Websocket on Rails
Timeless - Websocket on RailsTimeless - Websocket on Rails
Timeless - Websocket on Rails
 
Web socket with php v2
Web socket with php v2Web socket with php v2
Web socket with php v2
 
COMET in Plone
COMET in PloneCOMET in Plone
COMET in Plone
 
T3DD12 Caching with Varnish
T3DD12 Caching with VarnishT3DD12 Caching with Varnish
T3DD12 Caching with Varnish
 
Rails hosting
Rails hostingRails hosting
Rails hosting
 
Using WebSockets with ColdFusion
Using WebSockets with ColdFusionUsing WebSockets with ColdFusion
Using WebSockets with ColdFusion
 
Sonata Block Bundle - sfPot March 2014
Sonata Block Bundle - sfPot March 2014Sonata Block Bundle - sfPot March 2014
Sonata Block Bundle - sfPot March 2014
 
meet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrakemeet.php #11 - Huston, we have an airbrake
meet.php #11 - Huston, we have an airbrake
 
Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015
 
Geeky Academy Week 3 :: Vagrant + Puppet
Geeky Academy Week 3 :: Vagrant + PuppetGeeky Academy Week 3 :: Vagrant + Puppet
Geeky Academy Week 3 :: Vagrant + Puppet
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
Websocket
WebsocketWebsocket
Websocket
 
DEV301- Web Service Programming with WCF 3.5
DEV301- Web Service Programming with WCF 3.5DEV301- Web Service Programming with WCF 3.5
DEV301- Web Service Programming with WCF 3.5
 
An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony
 
Jetty and Tomcat
Jetty and TomcatJetty and Tomcat
Jetty and Tomcat
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packager
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packager
 
Smuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTPSmuggling TCP traffic through HTTP
Smuggling TCP traffic through HTTP
 
BackPAN Archeology
BackPAN ArcheologyBackPAN Archeology
BackPAN Archeology
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
 

En vedette

Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosPeter Moskovits
 
Websockets - DevFestX May 19, 2012
Websockets - DevFestX May 19, 2012Websockets - DevFestX May 19, 2012
Websockets - DevFestX May 19, 2012Sameer Segal
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocketsametmax
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSSRachel Andrew
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back KidEthos3
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsShelly Sanchez Terrell
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaChris Lema
 

En vedette (7)

Real Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and DemosReal Life WebSocket Case Studies and Demos
Real Life WebSocket Case Studies and Demos
 
Websockets - DevFestX May 19, 2012
Websockets - DevFestX May 19, 2012Websockets - DevFestX May 19, 2012
Websockets - DevFestX May 19, 2012
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and Adolescents
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
 

Similaire à Websockets

"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R..."Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...Fwdays
 
Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Alexandre Morgaut
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)Kevin Gill
 
Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDDSudar Muthu
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesRobert Lemke
 
Porting C++ apps to FLASCC
Porting C++ apps to FLASCCPorting C++ apps to FLASCC
Porting C++ apps to FLASCCPavel Nakaznenko
 
Mark Rendle ".NET Is Dead. Long Live .NET!"
Mark Rendle ".NET Is Dead. Long Live .NET!"Mark Rendle ".NET Is Dead. Long Live .NET!"
Mark Rendle ".NET Is Dead. Long Live .NET!"Fwdays
 
Working with WebServices.ppt
Working with WebServices.pptWorking with WebServices.ppt
Working with WebServices.pptpepep15
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko3D
 
Best practises for HTML5 servers (Devaamo Summit 2012)
Best practises for HTML5 servers (Devaamo Summit 2012)Best practises for HTML5 servers (Devaamo Summit 2012)
Best practises for HTML5 servers (Devaamo Summit 2012)Otto Kekäläinen
 
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01purans
 
Debugging with Fiddler
Debugging with FiddlerDebugging with Fiddler
Debugging with FiddlerIdo Flatow
 

Similaire à Websockets (20)

"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R..."Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
 
Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017
 
Locking Down CF Servers
Locking Down CF ServersLocking Down CF Servers
Locking Down CF Servers
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
 
Introduction to node.js GDD
Introduction to node.js GDDIntroduction to node.js GDD
Introduction to node.js GDD
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Porting C++ apps to FLASCC
Porting C++ apps to FLASCCPorting C++ apps to FLASCC
Porting C++ apps to FLASCC
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 
Mark Rendle ".NET Is Dead. Long Live .NET!"
Mark Rendle ".NET Is Dead. Long Live .NET!"Mark Rendle ".NET Is Dead. Long Live .NET!"
Mark Rendle ".NET Is Dead. Long Live .NET!"
 
Working with WebServices.ppt
Working with WebServices.pptWorking with WebServices.ppt
Working with WebServices.ppt
 
ColdFusion 10
ColdFusion 10ColdFusion 10
ColdFusion 10
 
ASP.NET vNext
ASP.NET vNextASP.NET vNext
ASP.NET vNext
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++
 
Best practises for HTML5 servers (Devaamo Summit 2012)
Best practises for HTML5 servers (Devaamo Summit 2012)Best practises for HTML5 servers (Devaamo Summit 2012)
Best practises for HTML5 servers (Devaamo Summit 2012)
 
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
 
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerryjWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
 
Debugging with Fiddler
Debugging with FiddlerDebugging with Fiddler
Debugging with Fiddler
 
Node.js
Node.jsNode.js
Node.js
 

Dernier

The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxNeo4j
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 

Dernier (20)

The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 

Websockets

  • 1. Open CF Summit 2012 Billy Cravens
  • 2. Billy Cravens  ColdFusion since 4.0 (1999)  Houston CFUG manager  Former DFWCFUG board member  Other languages: PHP, .NET; node.js ninja in training  Remember the Wrox book?  Supporter of Cystic Fibrosis  www.CureCF.com
  • 3. Full-blown training on WebSockets  Limited to only open source engines  A spectacular demo – we’ll look at bare bones chat implementation  “I hate chat app examples” - Ray Camden  In-depth knowledge of OSS roadmaps
  • 4. An overview of options in all available CFML engines  Highlight the role of open source solutions across this entire space  A review of the landscape on February 25, 2012
  • 5. Polling  Long-polling / Comet  Flash
  • 6. What are they? ▪ Bi-directional, full duplex TCP communication in the browser ▪ Not finalized – multiple versions ▪ ws(s)://serviceURI(:port)(/optional/path) ▪ Client side: JavaScript
  • 7. Support  Browsers that support WebSockets ▪ IE 10+, FF 6+, Chrome 14+, iOS 4.2+, BB OS7  Using Flash and JavaScript as polyfill ▪ https://github.com/gimite/web-socket-js ▪ The code
  • 8. node.js/socket.io  WebSockets + evented JavaScript  Complexity  PusherApp  Hosted service  Dependent
  • 9. ColdFusion < v.10  Railo  Open BlueDragon
  • 10. https://github.com/nmische/cf-websocket- gateway  Built on Netty, non-blocking IO framework for Java (similar to node.js)  Built on Webbit, a Java WebSocket server
  • 11. Event gateway  Copy JARs and restart ColdFusion  Configure gateway type  Configure gateway instance  Create CFC with WebSocket methods ▪ Open Connection ▪ Close Connection ▪ Incoming Message
  • 12. Event gateway  Railo allows for gateways types to be written in CFML (ACF=Java)  Railo has extension API: add gateways, libraries, etc, via Admin  Gateway based on lightweight WebSockets server ▪ https://github.com/TooTallNate/Java-WebSocket
  • 13. More info ▪ http://wiki.getrailo.org/wiki/Extensions:WebSockets_Ga teway
  • 14. I encountered some errors  You can report – fast to respond  You can fix – gateway is in CFML  Install script is CFML – you can troubleshoot
  • 15. I almost made it work  fix code in install.cfc: (railo-root)/WEB-INF/railo/temp/compress/(random string)/(UUID)/railo/install.cfc ▪ *** didn’t work ***  manual copy ▪ (railo-root)/WEB-INF/railo/temp/compress/(random string)/(UUID)/railo WebSocket.cfc and WebSocketListener.cfc to (railo-root)/WEB-INF/railo/components/railo/extension/gateway/ ▪ Then restart ▪ Still no WebSocket option in gateways screen  Moved WebSocketGateway.cfc from (railo root)/WEB- INF/railo/context/admin/cdriver to …../gdriver ▪ Restarted - this fixed it  Had to add mapping to components/railo directory
  • 16. On to the code ….
  • 17. Current release (2.02) added socket functions  Not so fast …  Raw TCP Sockets, not WebSockets    Options  craft handshake yourself  Use a wrapper: https://github.com/kanaka/websockify  Write a wrapper: tiny little node.js script
  • 18. Simple WebSockets support  Configuration: CF Admin > Server Setting > WebSocket  Port: for WS client  Socket Timeout  Max Data Size: default OK for most apps  Start Flash Policy Server: for Flash fallback
  • 19. The code
  • 20. Advantages  Little code  More open than other approaches (Flash, Blaze DS, etc)  Disadvantages  Little analysis of the guts  Beta 1 – probably summer before gold  Commercial product