I’ve been looking quickly at your services and wondered if it was possible to create a webSocket server ( sort of a relay) only with no app deployed.I don’t need persistent data at all (except for tokens and auth but I can use another service provider for this).
So my goal would be to:
- be able to create endpoints
- let user choose the region for lower latency
- have a basic but secure auth process like a token to access the stream
- ability to create multiple channels (or rooms).
So I would like to keep it clean and simple and more often to be dedicated to reduce as mush as possible latency and heavy processes.
If someone could give me hints, examples, solutions… I would be more thant happy.
Many thanks in advance.
Fly is a good fit for this. But, I’m not sure what you mean by ‘no app deployed’. You would need to write your server and run it on VMs in each target region. You could start with very small ones. Websockets should work without issue.
Do you already have a framework chosen? You might want to take a look at this websockets-based realtime service from Supabase, which runs on Fly: Realtime | Supabase
@jsierles Thank you for your answer, yes I’ve saw this service ( the supabas one ) but it’s not released yet and I was thinking that maybe by running my own server I could gain few latency milliseconds less. Do you have code of a basic webSocket server I could easily deploy to make some test ( a sort of starter pack ); Many thanks in advance
That service is built on Phoenix/Elixir. We love it because its built-in features around presence/clustering fit Fly’s services perfectly.
We don’t have a starter pack, but this project looks pretty good as a starter: GitHub - dwyl/phoenix-liveview-chat-example: 💬 Step-by-step tutorial creates a Chat App using Phoenix LiveView including Presence, Authentication and Style with Tailwind CSS
@jsierles Thank you very much I’ll have a look.
Best.