3 ms·
The other decent alternative for some of these problems are often some flavour of messaging queues and event sourcing. E.g for the chat system you could probabl
by Tanjreeve 5y ago
The other decent alternative for some of these problems are often some flavour of messaging queues and event sourcing. E.g for the chat system you could probably shoot messages through a broker and then send a "chat finish" message. The disadvantage of this is if your broker is under heavy load then your chat app will perform linearly worse under increasing load while using the actors and state mean you can have a lot more stuff happening concurrently without the problems of waiting for events to go through a queue hence the latency advantages. Let alone if your servers are ephemeral and changing constantly then that's just another level of complexity to manually roll to keep your session state going that pretty much comes out the box to a production standard in akka persistence and sharding.
- sorokod 5y agoA chat system is one of the first network programming exercises. You must be trying to satisfy requirements that are beyond basics. Assuming persistent chat rooms are required, do you really need anything beyond some tables in a relational database that model chat rooms/chats?
- Tanjreeve 5y agoThis isn't talking about a hello world level application this is talking about an application managing complex state at scale. Maybe some bytes sent between points representing audio at the same time across several different sessions. I assure you that the problem set slack, people working on Fortnite servers etc is not the same problem set as a network programming illustration even if it's the same start point.
- stolsvik 5y agoAs a possible alternative, you could check out my library: https://github.com/centiservice/mats3 https://github.com/centiservice/mats3
- Tanjreeve 5y agoI've got to wrap my head round it a bit I'm definitely interested the approach as a lot of data/analytics people probably would be.