Re: Ratchet and Redis pubsub?

673 views
Skip to first unread message

Igor Wiedler

unread,
Dec 11, 2012, 10:59:24 AM12/11/12
to ratch...@googlegroups.com
Hi James,

Did you see the PubSub example in the predis-async repo? It shows quite nicely how you can subscribe to a channel and get messages from it. Just make sure to re-use the same instance of the event loop everywhere.

I'd be glad to answer any more specific questions you may have.

Regards,

Igor

Igor Wiedler

unread,
Dec 14, 2012, 8:38:35 AM12/14/12
to ratch...@googlegroups.com
Yeah, the only thing you need to do to make two react-related libs work together is inject the same loop everywhere.

Regards,

Igor



On Dec 14, 2012, at 1:51 PM, ja...@jmoz.co.uk wrote:

Yes I've seen that and used it already, my problem was I wasn't sure how they all fit together.

I've been working on a solution that seems to work ok atm.  I figured I had to pass the predis client an instance of the React $loop, then do some pubsub stuff on onSubscribe.

Once I've got it all working I'll post it up.

--
 
 
 

cboden

unread,
Dec 17, 2012, 5:11:57 PM12/17/12
to ratch...@googlegroups.com, ja...@jmoz.co.uk
Very cool!  Thanks for sharing James!

On Monday, 17 December 2012 17:03:33 UTC-5, ja...@jmoz.co.uk wrote:
For anybody looking for a Redis implementation, this is what I came up with http://silex-test.jmoz.co.uk/pubsub
Reply all
Reply to author
Forward
0 new messages