Pusher/Pubnub versus Socket.io

2,782 views
Skip to first unread message

Matthew O'Riordan

unread,
Jun 26, 2012, 6:07:07 PM6/26/12
to nod...@googlegroups.com
I'm in the process of evaluating whether it's better to run one's own Node server(s) with Socket.io, or use one of the well known realtime WebSocket services out there such as Pusher or PubNub that I am assuming will take away all the pain in regards to running the service.

I was really hoping (and will be most grateful) to get some advice from anyone who's possibly been there and done this already.  Any of your thoughts on the following would be hugely appreciated:
  • If you've gone the paid route with Pusher or PubNub, why did you do that?  If home grown / Socket.io, why as well?
  • Do you think the global presence of PubNub is that important when it comes to latency?
  • Do you find Pusher/PubNub price prohibitive?  Based on my initial calculations, a few millions messages a month over SSL for $49 a month with Pusher seems fair, but do you think I'm off the mark perhaps?  I know Socket.IO is free, but it comes with a price tag once you start running the service yourself...
  • Were there any particular features of PubNub or Pusher that you found extremely useful that Socket.IO does not have, such as private channels, or presence for example?
  • Having done one or the other, any advice in retrospect?  Any difficulties, problems, or wishes?
Appreciate your feedback if you have any.

Thanks,
Matt

Matthew O'Riordan

unread,
Jun 28, 2012, 11:16:34 AM6/28/12
to nod...@googlegroups.com
Hi Stephen

Thanks for that response, very thorough, although I now have a few more questions I was hoping you could answer.
    1. Cross Platform AES Symmetric Key Cryptography
What does this mean?  As a developer, can I connect to your service using a private key that is never shared across the line?  Also, can I set permissions or capabilities for a connecting user so that they can say only subscribe to events on particular channels, whereas for other specific channels they can broadcast and subscribe?
    1. SHA256/HMAC Message Origin Signing
Is this part of the library, or does one have implement this signing oneself?
  1. Reliability - Globally Distributed in 10 Data Centers across Earth, PubNub is the largest cloud based messaging fabric provider for mobile and web.
That's interesting, as I thought you ran on Amazon in 4 data centres, see https://help.pubnub.com/entries/21112667-where-are-pubnub-servers-located.  Also, as far as I was aware, Amazon currently operates EC2 in 3 US regions, 1 Europe region, 2 Asian regions and one souther US region, so that's 7 regions.  Do you have data centres in more regions than that?  Can you explain in a bit more detail about where your servers actually reside and is there full capability at each region.  Also, mind telling me, if I send a message from Europe on a channel, and there are other subscribers in Europe, will the message get routed via another region, or would it be routed from Client in Europe -> Europe Data Centre -> straight to another client in Europe?

Socket.IO is now on PubNub! Leverage the PubNub global distribution cloud network at full speed and scale using the Socket.IO API on top of PubNub Cloud:
Mind telling me what a typical use case for using Socket.IO and PubNub would be.  Surely Socket.IO and PubNub provide very similar things - realtime messaging?

Read the Full PubNub Client API Specification: https://github.com/pubnub/pubnub-api/blob/master/README.md  Let me know if I may answer any more questions.
What do you mean by "Locksetp Synchronization with Everyone on Earth - Synchronize Mass Audiences."?

Thanks,
Matt

Arunoda Susiripala

unread,
Jun 28, 2012, 11:21:56 AM6/28/12
to nod...@googlegroups.com
Interesting topic.

I'll add brigde to this list and, It also very similar (may be or more) to pubnub.

And I like the pubnub theme song too - 2 way internet radio - http://www.youtube.com/watch?v=jZgcEj_qKLU&feature=player_embedded

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en



--
Arunoda Susiripala


Matthew O'Riordan

unread,
Jul 1, 2012, 7:05:38 PM7/1/12
to nod...@googlegroups.com
I do love the PubNub theme song too ;)

Stephen Blum

unread,
Jul 2, 2012, 11:20:45 PM7/2/12
to nod...@googlegroups.com
Hi Mathew!

You are welcome for the response.  I am happy to answer more questions.
  1. Cross Platform AES Symmetric Key Cryptography - Read Blog Article
    1. Basically Full Round-trip Cryptography of Data (Beyond SSL) - Though your data is encrypted as it travels through the Internet, it must be decrypted (and re-encrypted) as it passes through the PubNub servers and back out again. This is not a limitation of PubNub, but simply a limitation of the way SSL works.
    2. In regards to the Send/Receive permissions: Exclude the PUBLISH KEY in order to prevent sending of data.
  2. SHA256/HMAC Message Origin Signing
    1. This happens automatically when you include the SECRET KEY.
  3. Reliability - Globally Distributed.
    1. We operate in 10 Discrete Physical Locations (different buildings).  
    2. The most recent EC2 outage on the East Coast was mitigated and customers were routed to the healthy data centers.
  4. Socket.IO + PubNub
    1. PubNub is a Cloud Messaging Service (Send/Receive)
    2. Socket.IO is a higher-level interface that provides extra functionality on top of a Message Bus like PubNub.
    3. You can think of Socket.IO like a jQuery type library that sits on top of the base infrastructure.
  5. Locksetp Synchronization with Everyone on Earth.
    1. This means that data is replicated quickly to all devices.  For example if a Sport Score was updated while a game was in progress, this update would be sent as a PubNub message and all phones would be updated at the same time; all people would see the score update at the same time.
    2. This type of application is perfect with PubNub Galaxy, our Mass Fan-out service: http://www.pubnub.com/solutions/pubnub-galaxy
Glad to be of assistance!  Note that this thread takes us a while to check for updates.  If you want a bit faster response you can send messages to sup...@pubnub.com :-)

Matthew O'Riordan

unread,
Jul 3, 2012, 10:52:51 AM7/3/12
to nod...@googlegroups.com, sup...@pubnub.com
Thanks for the wonderfully detailed response Stephen, but I hope you can answer one last question.

I understand your point about Socket.io being a higher-level interface, but I am still struggling to understand a good use case for using Socket.IO with PubNub.  Perhaps I am being a bit thick.  Could you give me an example or two of where there is a good fit for Socket.IO and PubNub as opposed to just PubNub on its own?

Matt

Stephen Blum

unread,
Jul 3, 2012, 6:06:07 PM7/3/12
to nod...@googlegroups.com, sup...@pubnub.com
Hi Mathew,

Excellent questions regarding Socket.IO on PubNub.  To answer your question, I will list the two options and describe more details with pros/cons:
  1. Socket.IO + PubNub - Network Library
    1. You will pick this option to take advantage of a bunch of pre-built design patters such as Multiplexing and Message Routing plus a List of Users and Metadata about those users.  
    2. Some pre-built security and additional connection state details are maintained behind the scenes.  
    3. As a result the library will consume/produce a higher volume of Control Messages than if you are using the PubNub Core Library directly.  
    4. The benefit is some great pre-built design patters that will save you time when you build your app.
    5. The cost is higher on message consumption/production.
  2. PubNub Plain - Send/Receive Only
    1. You will pick this if you want low level Send/Receive control.  
    2. If you want full control of the message pipe, you will pick this option.  
    3. Pick this option to have full control of send/receive pipeline and employ any variety of design pattern needed.
    4. You are not locked into a design pattern up front, you can send/receive to one or many endpoints easily.
    5. You have more control here with less out-of-the box functionality than you'd get from Socket.IO library on PubNub.

Stephen Blum

unread,
Jul 3, 2012, 6:08:49 PM7/3/12
to nod...@googlegroups.com, sup...@pubnub.com
Mathew,

Correct with #2 "PubNub Plain - Send/Receive Only" should be in fact "PubNub Plain - Send/Receive OR PUB/SUB" - Basically you have full control with PubNub core libarary, where as PubNub + Socket.IO you get higher level features while giving up some control of the data pipe to the Socket.IO library on PubNub.
Reply all
Reply to author
Forward
0 new messages