I am completly new to elixir and concurrent programming but I want to develop a chat app in elixir so my question is what will be the right backend architecture for my app I mean how can I connect Flutter and React to the chat backend. Should I use
- Long polling
- Tcp socket
go with phoenix and use phoenix channels/sockets
is phoenix channels/sockets are scalable as pure elixir?
depends how good you are at writing it
phoenix channels is written in pure elixir : ) they have already figured out the gotchas and optimizations you will stumble on along the way as you learn the language
In Akka, I worked on a system that used a stateless websocket server to talk to the front end, and queued each message into kafka, which was then processed by the chat server with one actor per chat user. I was focused on subsets of the system, so I didn’t work on the chat server. The architecture seemed to work well.
That system has very specific goals with respect to minimizing battery drain on mobile client, maximizing message delivery in the face of intermittent Internet connectivity on the mobile clients, and working well with rolling deployments.