NobbZ

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

chrismccord

Creator of Phoenix

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.

allyraza

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

nonblockio

Hi folks, I meet the same problem recently :joy: Is there any solution?

Last Post!

proxima

proxima

I’ve just wrapped up a spec-compliant engine.io implementation in Elixir, and am going to tackle socket.io here shortly. At my current place of work, integration with Plug.Router is plenty, but I’m curious to hear from others if it’s worth the effort to go a few steps further:

  • Is supporting all versions of engine.io / socket.io important to you?
  • Is Phoenix integration important to you?
  • Would mapping the Phoenix Channels API to socket.io’s “namespaces” be useful? They seem more or less analogous. By this I mean socket.io client-side js interoperability with server-side Phoenix channels.

Where Next?

Popular in Questions Top

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement