Live data from Hacker News

Lambdoku – AWS Lambda with Heroku-like Experience

github.com

1–10 of 45 posts

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#3
I'm wondering if it would be possible to create something like Lambda, but optimized for multiplayer servers with game loops? What if there was a platform that let you write pure functions to create player accounts, spawn game instances, and handle the transformation of player and game state from tick to tick? (You'd have to choose a particular architecture for synchronization with the client, of course. Also, before someone makes the mistake of assuming I'm as stupid as they are -- I'm not proposing that a function be transmitted, compiled, then evaluated at each tick over the network! Functions would be installed into virtualized servers.)

Clojure, Javascript, and Golang would be good languages for this. The environment possibly would let you inject and replace functions live, lending to a Light Table like experience, but while developing a multiplayer game.

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#5
post #4

Another nice project that helps to ease lambda workflows is https://github.com/garnaat/kappa

There is similar project called Zappa. pip install zappa

Zappa actually uses some of Kappa under the hood, but with many many more features. Learn more here: https://github.com/Miserlou/Zappa

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#8
Hey! Great project. We actually built stdlib [1] to capture an experience similar to Heroku's for building microservices, and we'll be presenting at AWS Re:invent on Tuesday [2]. Our workflows with our public API are accessible via our open source library, would love contributors such as yourself (and anybody else that finds it interesting!). We have a diverse team working on the project - Xooglers, support from early Heroku team members, and even some YC alumni lending a hand. :)

[1] https://github.com/poly/stdlib

[2] https://www.portal.reinvent.awsevents.com/connect/sessionDet...

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#9

I'm wondering if it would be possible to create something like Lambda, but optimized for multiplayer servers with game loops? What if there was a platform that let you write pure functions to create player accounts, spawn game instances, and handle the transformation of player and game state from tick to tick? (You'd have to choose a particular architecture for synchronization with the client, of course. Also, before…

You could, but the latency issues (network hops) would make the solution untenable. Function as a Service platforms are ideal for solutions where scalability is a huge concern, latency not so much. These functions are all running inside of containers that have been optimized to be "warmed up" extremely quickly, but that warm-up takes time, and the more robust the solution, the longer the warm-up.

You'd probably want architecture extremely specialized to a game loop, and probably your game loop specifically, if you wanted low-latency, high-availability FaaS for this purpose.

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#10

I'm wondering if it would be possible to create something like Lambda, but optimized for multiplayer servers with game loops? What if there was a platform that let you write pure functions to create player accounts, spawn game instances, and handle the transformation of player and game state from tick to tick? (You'd have to choose a particular architecture for synchronization with the client, of course. Also, before…

Your basic description sounds like LambdaMOO (written in 1990, the name is a coincidence).

The LambdaMOO server has a main event loop which handles user events, then schedules tasks which execute functions ('verbs' in LambdaMOO parlance) to modify the game state. Verbs are not pure per se but can be thought of as a transaction which executes in an atomic, consistent, and isolated manner. Verbs are attached to objects in the game, and can be modified in-game on the fly by players with their programmer bit set. (Programmers can only modify verbs on objects they own.)

The LambdaMOO language is a lot like JavaScript with a Luaesque syntax. It has prototypical inheritance, which meshes well with its concept of objects as physical things. For example, to get a new instance of a duck one would create a Generic Duck named "My Duck" ('Generic' being the conventional prefix for an object specifically intended to be used as a prototype.)

There was a time in the late 1990s when it regularly supported 300 active users at once (with a certan amount of lag); on modern hardware it could probably handle significantly more than that. If you want a modern scalable system then LambdaMOO itself is probably not for you; the server is single-threaded (in fact the whole thing is remarkably similar to NodeJS with async/await support) and state is saved in-memory and checkpointed periodically (hence the Durability missing from the above description of verbs).

However, the basic design (prototypal inheritance, in-database verbs, ACI[D] tasks, etc) is extremely well proven, and would lend itself well to being copied into a modern distributed system like AWS Lambda. As long as you had an ACID datastore to back it up, you could scale the task execution as far as you wanted, and with a bit of clever work you could probably come up with a partitioning scheme to make the database scale as well.

In fact, I've partially implemented this already; what's stopped me has primarily been that I'm more interested in the technical aspects and have no idea what I would actually use it for once I built it. If you have a use case for this sort of thing I'd love to hear about it.

Post reply on HN