5 ms·
Instead, data center services should be built using stateful application servers or custom in-memory stores with domain-specific APIs, which offer higher perfor
by stcredzero 7y ago
Instead, data center services should be built using stateful application servers or custom in-memory stores with domain-specific APIs, which offer higher performance than RInKs at lower cost.
I'm in the midst of implementing a stateful application server-cluster with custom in-memory stores with domain-specific APIs. Basically, it's a way of implementing a game loop and a multiplayer game by specifying lambdas going against in-memory entity databases and in memory spatial databases. However, to do this, I have gone from using PostgresSQL to the Badger fast key-value store as a database. I'm mainly motivated by the desire to keep everything in golang and eliminate all outside dependencies.
That said, what I'm doing is increasing the granularity of the server processes. The server processes are composed of Actor-like things which are responding to async input queues. So my experience both confirms and contradicts some of the the things said in the paper.
- kitotik 7y agoI’m looking more and more at Erlang/OTP for many of these same reasons. Ets/Dets/Mnesia seems to address a ton of typical stateful app use cases right out of the box, and it was built for the Actor model with mass quantities of fine-grained processes you mentioned. It’s cool to hear a similar approach can be done in golang without a ton of external deps.
- jrumbut 7y agoWould you mind sharing what made you go with a stateful application server? I've never found myself in the situation of wanting to go that direction.
- stcredzero 7y agoWould you mind sharing what made you go with a stateful application server? I'm implementing a MMO game loop. Even though I am exposing the API as what amounts to a bunch of lambdas, under the covers, I am holding onto state and mutating it, basically for performance. EDIT: To put it another way, there is a level of abstraction at which my system is stateless. To implement that with enough performance, I have to hold onto state, so I can deliver data to the implementation of those abstractions in a timely fashion.
- jrumbut 7y agoInteresting perspective, thanks!
- zemo 7y agothe main function of a multiplayer game server is to contain the game state. Depending on the game, it may also run a simulation. You couldn't, for example, write a database record every time someone shot a gun in an FPS, the whole thing would come to a crawl. And game clients generally only care about the present. Only the current game state is of interest to the client in most situations; the past is rarely queried. The outliers here are things that are naturally transactional and persistent like character progression and item ownership; those things you'd stick in a database.
- jrumbut 7y agoMakes sense thanks!
- zemo 7y agoha, I ... also am working on a stateful game server in Go, the multiplayer servers that power Jackbox Games' line of games. I don't currently need disk persistence though, I just do it all in memory. It's also way easier than an MMO because the game is entirely instanced, so you can just partition the data by the game instance.
- estsauver 7y agoJust wanted to say playing Jackbox with my family has been really enjoyable, and it's really great how easy it is to get everyone set up and started.