Transcript
Page 1: JAB14 - Realtime Joomla Websites

+

Daniele Rosario (@Skullbock)

weble.it - joomlacommander.com

Realtime Joomla WebsitesWebsockets in the Real World

Page 2: JAB14 - Realtime Joomla Websites

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

Page 3: JAB14 - Realtime Joomla Websites

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

Page 4: JAB14 - Realtime Joomla Websites

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)

Page 5: JAB14 - Realtime Joomla Websites

Daniele Rosario (@Skullbock)

weble.it - joomlacommander.com

Websockets in Joomla• Using Ratchet

• Fired by a JApplicationCli

Page 6: JAB14 - Realtime Joomla Websites

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


Recommended