-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we be using socket.io with elm? #93
Comments
@finnhodgkin are you referring to this one: https://github.com/mgold/elm-socketio ? 🤔 |
@nelsonic Yep that's the one. My search wasn't very extensive so there may be a nicer, more up to date package. Today's the day for a less speculative look 👍 Here's our hapi/ws/elm prototype from a few days ago: https://github.com/finnhodgkin/Elm-Online-Offline/tree/elm-heroku-test |
@finnhodgkin your prototype looks good. 👍 |
We've ended up going with socket.io, so that we can have the Elm chat talk to the non-elm chat and vice versa, and so that we can learn how to work with ports a little more. Having dealt with Elm's own WebSocket library in the online/offline app that Finn linked we felt learning how to do it with ports would be beneficial, and mean that it fits better in this repo. If we took out socket.io we'd more or less have to build an entire new back end which doesn't make much sense when the focus for this is front end with Elm. If @finnhodgkin is satisfied with this I'll close this issue |
I'm fine with that 👍 It makes sense not to worry about it too much as we'll be moving to Pheonix sockets at some point in the future anyway. |
If the eventual aim is to move to Pheonix sockets, would it make more sense to skip socket.io and go for plain websockets in our Elm prototype? The only elm-socketio package I've found is no longer maintained (recommends Socket.io 1.4.4) so we'd have to use ports more extensively.
A potential pitfall is that elm-lang/websocket doesn't support long polling so no ie8/9.
In contrast Elm-Pheonix-socket:
So in the long run we'll be golden 👍 It also has a similar ish api to elm-lang websockets.
The text was updated successfully, but these errors were encountered: