foxfriends / root

Play Root online with friends. Original board game by Cole Wehrle, with art by Kyle Ferrin
6 stars 1 forks source link

Use actors on the server #16

Closed foxfriends closed 3 years ago

foxfriends commented 3 years ago

Seems like a good fit here to use an actor model (e.g. actix?) to handle the server, rather than whatever sketchy function I built. This will help enable every player's socket to respond to events sent by any other player, as communication between actors will be a lot easier.

foxfriends commented 3 years ago

After some attempt at building this with Actix, I just... don't feel like it's really going to work. Admittedly I haven't run the code, but my instincts are saying don't do it to a lot of the stuff I was doing... Maybe I'll come back to that one day after learning more about Actix, or maybe use a different library (Axiom?). Might also just not be worth using a whole actor library, and just using the pattern directly with channels.

foxfriends commented 3 years ago

Closing this one, I think it's close enough now (just sending messages via channels, but similar idea)