Hacker News new | past | comments | ask | show | jobs | submit login

Why did you switch to Firebase?



Originally, we used socket.io for presence management and PeerJS library (http://peerjs.com), which uses its own websocket server, for WebRTC signaling. We had 2 websocket servers and we really wanted to avoid hosting them ourselves, so we considered 3 third-party services - Pusher, PubNub and Firebase.

Pusher has really awkward presence management that requires you to store user state on your own server, if I understood their docs correctly.

PubNub had similar issue as Pusher, though very recently they released a new feature that allows you to broadcast user state changes without having to store it on your own server.

Firebase is in my opinion the easiest one to use, especially for presence management, because it's a real database and not only a messaging service. It's also actually really easy to use for private messaging as well, even though I think it wasn't originally designed for that. We've changed PeerJS library to use Firebase for WebRTC signaling, which is basically a form of private messaging. We've also used Firebase in some of our previous projects - e.g. https://github.com/cowbell/presence-firebase.

If you're interested, you can check out the relevant source code for presence management at https://github.com/cowbell/sharedrop/blob/master/app/scripts... and WebRTC signaling at https://github.com/cowbell/sharedrop/blob/master/app/scripts....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: