Live data from Hacker News

Lambdoku – AWS Lambda with Heroku-like Experience

github.com

11–20 of 45 posts

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#11

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…

If I was building a MUD or MMO from scratch today I'd try with Elixir (the language built on Erlang). Functional programming with hot code replacement, implementing the actor model for distributed, fault-tolerant, soft-real-time massively concurrent applications, does that sound similar to what you're looking for?

Growing that into a FaaS product would be hard though; Erlang processes all share a trust domain, from the infosec point of view, so containerizing each function/process for invocation lambda-style on otherwise shared infrastructure may prove difficult.

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#12

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…

There was a time in the late 1990s when it regularly supported 300 active users at once (with a certan amount of lag)

I had a pseudo-roguelike server first implemented in Clojure, then in Go that updated 12 frames a second. It could support 250 simultaneous users. It even had Conway's life as an area attack. I had it posted to Show HN.

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.

All that's needed is pure functions, soft realtime, and good tooling and APIs. ACID takes some doing, in terms of implementation and will also make scaling complicated, as you mention above. Inheritance? Nice but not necessary. Just let developers inject functions into a game loop, then tell them their load and when their simulation tick rate starts to drop.

If you have a use case for this sort of thing I'd love to hear about it.

Yes. Something like that could be packaged into MMOGAAS -- Massively Multiplayer Online As A Service.

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#13

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…

You could, but the latency issues (network hops) would make the solution untenable.

...ok... Did you read my comment?

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.

Yeah, of course that's not going to work.

I've basically built a specialized "container" system, but instead of using kernel virtualization, it's actually a specific Go "object" residing in an already running server process. These "containers" (really instances) start running in an environment where we already have a virtual server with a process with a server/game loop up and running. I have a cluster of processes that does this, and idempotently spawns an instance of star system in a multiplayer game consisting of 2^87 star systems.

www.emergencevector.com

Such a system can still be built on Docker style containers, it's just that those Docker style containers represent an entire sub-cluster of many server processes that can each host many "instance" containers which are where the functions that transform from tick n to tick n+1 reside.

You'd probably want architecture extremely specialized to a game loop

That is what I said in my comment.

and probably your game loop specifically

I'm saying that the game loop could be customized/built up by a developer by injecting functions into such a system. (Or, possibly, by injecting such functions into a dev version running locally, then exporting them to a server in the cloud.)

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#14

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…

If I was building a MUD or MMO from scratch today I'd try with Elixir (the language built on Erlang). Functional programming with hot code replacement, implementing the actor model for distributed, fault-tolerant, soft-real-time massively concurrent applications, does that sound similar to what you're looking for? Growing that into a FaaS product would be hard though; Erlang processes all share a trust domain, from t…

implementing the actor model

Each of my server processes in Go looks a little like an Erlang actor. There's a switch statement where a queue of input messages is processed, then each instance is run in turn. Instances also have a similar structure and maintain a "space" using an R-Tree. When it comes to efficiency, game loops are still a great way to do concurrency. Game loops per-instance allow you to sidestep many pitfalls of multi processor concurrency, much as per-process GC does with Erlang.

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#16

Earlier quoted context omitted.

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…

There was a time in the late 1990s when it regularly supported 300 active users at once (with a certan amount of lag) I had a pseudo-roguelike server first implemented in Clojure, then in Go that updated 12 frames a second. It could support 250 simultaneous users. It even had Conway's life as an area attack. I had it posted to Show HN. However, the basic design (prototypal inheritance, in-database verbs, ACI[D] tasks…

> Something like that could be packaged as Massively Multiplayer Online As A Service

That already exists, see Photon Engine's multiple PaaS options https://www.photonengine.com

Different ones have different APIs tuned for different types of gameplay and or Unity3D integration (by mimicking Unity's original networking programming API).

I've implemented them for an MMO I freelanced for a while back and it was pretty painless.

Re: Lambdoku – AWS Lambda with Heroku-like Experience

#17

Earlier quoted context omitted.

There was a time in the late 1990s when it regularly supported 300 active users at once (with a certan amount of lag) I had a pseudo-roguelike server first implemented in Clojure, then in Go that updated 12 frames a second. It could support 250 simultaneous users. It even had Conway's life as an area attack. I had it posted to Show HN. However, the basic design (prototypal inheritance, in-database verbs, ACI[D] tasks…

> Something like that could be packaged as Massively Multiplayer Online As A Service That already exists, see Photon Engine's multiple PaaS options https://www.photonengine.com Different ones have different APIs tuned for different types of gameplay and or Unity3D integration (by mimicking Unity's original networking programming API). I've implemented them for an MMO I freelanced for a while back and it was pretty pa…

So Photon is operating a farm of servers that are running game loops, which can have pure functions injected into them? (Also, the per message pricing!)
Post reply on HN