News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

James Morris:
A WebSockets, Ratchet, Silex and Redis PubSub Implementation
January 23, 2013 @ 12:09:33

James Morris has an interesting new post to his site about the creation of a real-time web service that could be used for iOS applications via Websockets. He chose Ratchet for the handling (a PHP-based websocket tool) combined with Redis and Silex.

I was approached by a betting/gambling development company who potentially needed a middleware building that would pull from an existing gambling web service and basically transmit to connected iPhone clients the changes from the web service. At first, the obvious answer might be to create another REST web service that the iPhone clients could just ping for changes. However, one of the devs explained that this wouldn't be fast enough, or scale - they'd need changes to be transmitted as soon as possible, as the app would be a real-time betting app and there'd be thousands of connections to the server.

His solution involved hooking together Ratchet, Redis, Silex and Predis-async to create this sample tool for handling the websocket requests. it uses the "pubsub" mechanism of Redis to push the updates out to listening clients.

0 comments voice your opinion now!
realtime websockets silex pubsub redis ios application api


blog comments powered by Disqus

Similar Posts

Aura Blog: Which is Lighter, Silex or Aura.Web_Project?

Niall Kennedy's Blog: Rasmus Lerdorf on scaling web apps with PHP

Java World: BEA showing PHP on Java app server

Job Posting: Kodak Seeks Application Developers - 5 Positions (Stamford, CT)

Alexander Netkachev's Blog: Automatic testing of MVC applications created with Zend Framework


Community Events

Don't see your event here?
Let us know!


introduction series example version laravel5 list community laravel language podcast voicesoftheelephpant library release api security extension opinion php7 interview framework

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework