Until I can spec this out properly, I’ll just quote an old post:
Programming in Lua, 4th Edition ended with an example of multiple Lua interpreters, each in its own OS thread, sending text messages to each other. I can refine that into a module for “Channels”, “Messages”, and “Processes” (POSIX or C11 threads, since Lua already has cooperative single-process Threads). Combined with a non-blocking IO module one could implement any kind of server with worker threads or chained stages: HTTP, message queue, pub/sub, etc. All you’d need are the underlying modules and some Lua scripts. (Maybe a configuration file to tie it all together.)1
-
Fellow survivors of Bang Networks in San Francisco may find the idea disturbingly familiar. ↩︎