4 ms·
I'm running Rust on Lambda at the moment for a PBE board gaming service I run. I can't say it runs at huge scale though, but using Lambda has provided me with s
by beefsack 9y ago
I'm running Rust on Lambda at the moment for a PBE board gaming service I run. I can't say it runs at huge scale though, but using Lambda has provided me with some really good architectural benefits:
* Games are developed as command line tools which use JSON for input and output. They're pure so the game state is passed in as part of the request. An example is my implementation of Lost Cities[1]
* Games are automatically bundled up with a NodeJS runner[2] and deployed to Lambda using Travis CI[3]
* I use API Gateway to point to the Lambda function, one endpoint per game, and I version the endpoints if the game data structures ever change.
* I have a central API server[4] which I run on Elastic Beanstalk and RDS. Games are registered inside the database and whenever players make plays, Lambda functions are called to process the play.
I'm also planning to run bots as Lambda functions similar to how games are implemented, but am yet to get it fully operational.
Apart from stumbling a lot setting it up, I'm really happy with how it's all working together. If I ever get more traction I'll be interesting to see how it scales up.
[1]: https://github.com/brdgme/lost-cities https://github.com/brdgme/lost-cities
[2]: https://github.com/brdgme/lost-cities/blob/master/.travis.yml https://github.com/brdgme/lost-cities/blob/master/.travis.ym...
[3]: https://github.com/brdgme/lambda/blob/master/index.js https://github.com/brdgme/lambda/blob/master/index.js
[4]: https://github.com/brdgme/api https://github.com/brdgme/api