+
Daniele Rosario (@Skullbock)
weble.it - joomlacommander.com
Realtime Joomla WebsitesWebsockets in the Real World
Daniele Rosario (@Skullbock)
weble.it - joomlacommander.com
HTTP• Runs over TCP / UPD
• Stateless Protocol
• Connect -> Send -> Receive -> Close
• http:// (or https://)
• Great for Resources
• Bad for realtime communications / streaming
• Easy to implement
Daniele Rosario (@Skullbock)
weble.it - joomlacommander.com
WebSockets• Runs over TCP
• Full Duplex Protocol
• Dedicated for the Web
• “Upgrades” an HTTP connection
• ws:// (or wss://)
• Very small footprint
• Connect -> “Emit” and “Intercept” messages
• Ideal for Realtime communications
Daniele Rosario (@Skullbock)
weble.it - joomlacommander.com
WebSockets in PHP• Needs to fire up a new Websocket Server in PHP
• Can’t “run” on apache
• “De-facto” standard Implementation:
• Ratchet (socketo.me)
Daniele Rosario (@Skullbock)
weble.it - joomlacommander.com
Websockets in Joomla• Using Ratchet
• Fired by a JApplicationCli
Daniele Rosario (@Skullbock)
weble.it - joomlacommander.com
Use Cases• Two basic Use cases:
• Browser <-> Browser
• Browsers <-> Server
If you just need Browser <-> Browser communication
only, you can use SaaS services like pusher.com