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.
Phoenix 1.4 included our rewrite of the channels layer, so you should be able to implement the Phoenix.Socket behavior and speak the socket.io contract. Check the Phoenix.Socket source to see how we implement multiplexed channels on top of the behaviour.
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.
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.
Yeah, I am coming back to this thread from time to time. I have a project, where we are hooking into unreal and using a socket io plugin for communication. Unfortunately, the team has not that much experience in this topic and is happy that it currently works… I would love to migrate the server side to elixir but need a socket.io compliant server api. With covid-19 budget is extremely limited and i haven’t found time to invest into research
Well, our situation got worse and we have various socket.io version requirements in different projects. I would love to give this a try and keep you updated about my progress. But right now I am not really sure where to get started. I guess I will have a look at the Phoenix.Socket behaviour. If anyone else might have a tip or hint I would be quite happy
Actually, for backwards compatibility, while being able to move forward and only having to maintain a single code base.
It is a kind of legacy situation. We have multiple projects which depend on different versions of a socket.io plugin. They targets socket io protocol v2, v3, and v4. Each has its own quirks and bugs. And there is no easy path to up- or downgrade those plugins to a single version.
My hope is, to have a minimal implementation of the socket.io protocol (or the various versions) which just suffices to provide those apps with what they need. And they only use a very tiny part of socket.io features.