edwardsmarkf
edwardsmarkf

Reputation: 1417

websockets vs express.io

i am looking for a very lightweight framework that can very simply pass data between browser and the server. i started looking around for a possible alternative to express & socket.io and came across express.io and have a couple of questions:

1) when i look at express.io on github, it would appear that there has been no activity for a couple of years. should this be of any cause for concern? from my newbie perspective, i would think that one wants to strike a balance between stability and something that might not be under active development anymore. but i am only guessing.

2) websockets looked very interesting and i see some very recent activity there. any thoughts on if this is a good replacement for socket.io ? our application will only be running on a new html5 browser.

i have looked at quite a few possibilities (layers, kaph, locomotive, stapes, hapi, etc) but i wanted to stick closely with something that was more sinatra-like, very similar to express. i also thought perhaps i should look for recent development.

or could it be that there is really nothing better than the original socket.io & express ?

thank you very much.

Upvotes: 1

Views: 2405

Answers (2)

Sean
Sean

Reputation: 21

https://pusher.com/ is a really nice software as a service that accomplishes this functionality. It's similar to socket.io and also runs on webSockets. There are a lot of other services like that out there. Pusher's free tier is not too bad, and you likely won't run over the hard constraints unless you're making enough money to pay for the premium tier of service. Their libraries are also super easy to understand.

socket.io is still a great choice, just wanted to show you that there are more options out there.

Upvotes: 0

jfriend00
jfriend00

Reputation: 707328

socket.io is built on top of webSockets. It adds a bunch of useful features that webSockets do not have such as automatic reconnection, structured message passing, etc...

So, one would only really go back to webSockets from socket.io if you had no use for any of the extra features that socket.io adds or if you need to be compatible with some other endpoint that is only a webSocket and not socket.io.

As for express.io, here's one such discussion of a similar question: What utility of express.io VS express + socket.io?. The fact that there has been no development on it in a few years and that the domain it was using has expired seems like it is no longer being supported unless there is some other fork that is being developed. I don't know express.io very well myself, but it appears to be just be some extra glue that allows you to capture socket.io messages using express-like route definitions. It doesn't appear to really offer new capabilities that can't be done with just express and socket.io.


For you to get much else in helpful advice, I think you'd have to describe a lot more about your requirements and why express + socket.io doesn't already meet your needs.

Upvotes: 2

Related Questions