NobbZ
Socket.io server in elixir
As we are currently evaluating server side technologies and I’m in the position to push elixir in my company here, I want to re-implement the current functionality of one of our backend modules in elixir, showcasing its capabilities.
I have some restrictions when doing so though of which I can solve the most, but one remains:
I am not allowed to break the current client software, which uses socket.io for real time communication with the backend among the usual HTTP-RESTful-API.
Is anyone of you aware of a server-side socket.io implementation in elixir (or erlang) that nicely integrates with Phoenix or Raxx?
I doubt beeing able to implement one on my own in the time I have.
Most Liked
chrismccord
allyraza
I am not aware of elixir implementation of socketio server, But I do know of an erlang implementation which I don’t think is actively being developed
nonblockio
Hi folks, I meet the same problem recently
Is there any solution?
NobbZ
Last commit was many years ago, so I fear it is to old for what I need. My front-end GUI told me that I need to be able to communicate with a 2.0 client.
Neither him nor me are sure if that is a protocol version or the clients version.
I’m also able to tell, that on the server side currently flask-socketIO is used in version 3.0.x.
If I only knew any details about that contract or they were properly specified in terms of a human readable document rather than untyped JavaScript as a reference implementation…
But as I have the python sources of the currently used server side library, perhaps I am able to re-implement the used subset for a start and extend on that…
A single week is very little time for re-implementing one of the transport protocols… Logic in that module is asymptotic to zero. Mainly its querying a database on one endpoint (and converting the database output to the needed JSON structure) and relaying messages from AMQP to the client and translating those system events to a simplified form that only contains category and label.
kartheek
Take a look at Phoenix.Socket.Transport — Phoenix v1.6.6 and you should be implementing socket.io protocol on it.
Below article implements binary WebSocket as Socket Transport -
Phoenix Socket expect heartbeat every 60 seconds - I think you have to figure out something on client side.
If phoenix socket doesn’t work out - may be you have to use cowboy web socket.
I have a question - why do you want to use elixir/erlang for socket.io ?







