rizen / WWW-Pusher

A Perl client for pusher.com.
1 stars 1 forks source link

pusher subscription feature #1

Open jhgorse opened 10 years ago

jhgorse commented 10 years ago

Are there plans to add the pusher subscription capability to this library? I'd been using robn's pusher-perl for the pusher-listener script. I haven't been able find other perl implementations.

rizen commented 10 years ago

I didn't know that was even possible. I'd accept a patch if you wanted to contribute it.

jhgorse commented 10 years ago

Okay, so I am a bit green on this stuff but let's talk architecture. There is the Pusher Server which hosts the service by receiving events from a Publisher (Server) and publishes the events to a Subscriber or Listener (Client). This WWW::Pusher is a Publisher (Server). Would then the proposed Subscriber (Client) be something like WWW::Pusher::Client?

The Pusher protocol is documented here: http://pusher.com/docs/pusher_protocol

Since it's a three party dance, I don't know how to think about it or if there is much if any abstract overlap in the data structures of interest. I doubt people will be running both except to test one with the other.

rizen commented 10 years ago

I probably wouldn't even make an extra class for it. I'd probably just add a "subscribe" method to the existing class.