NobbZ
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.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
I’ve followed the Phoenix LiveView file upload code here Uploads — Phoenix LiveView v1.0.0-rc.7 and so far everything works just fine wit...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Latest Phoenix Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #ai
- #iex
- #graphql
- #elixirconf-us
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
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
chrismccord
Phoenix 1.4 included our rewrite of the channels layer, so you should be able to implement the
Phoenix.Socketbehavior and speak the socket.io contract. Check thePhoenix.Socketsource to see how we implement multiplexed channels on top of the behaviour.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.
nonblockio
Hi folks, I meet the same problem recently
Is there any solution?
namxam
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
namxam
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.Socketbehaviour. If anyone else might have a tip or hint I would be quite happykartheek
Take a look at Phoenix.Socket.Transport — Phoenix v1.8.8 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 ?
namxam
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.ioprotocol (or the various versions) which just suffices to provide those apps with what they need. And they only use a very tiny part ofsocket.iofeatures.ZaneH
I looked into doing the work for this over a few days but decided it’s too much for me. I was also needing a way to use socket.io with Phoenix to use the Streamlabs Socket API. For now, I have that part of the codebase in a separate Node.js service.
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: