r/ProgrammingLanguages • u/Bitsoflogic • May 31 '26
Docker as the runtime
I want to move the boundary of the language beyond a single process. The compiler can own communication between processes and provide type safety throughout a larger system.
Over time, I've realized one of the key language features I'm developing is durable functions.
To that end, I'm seriously considering docker as the runtime. One container will host a database for storing the state of the durable functions and be completely managed by the "runtime". Each service the developer defines will be its own container as well.
From the developer's point of view, it should feel like its included the same way a garbage collector is included.
Have you seen any other attempts along these lines? Unison and Erlang are the closest I've found, but nothing targeting Docker.
View all comments
Show parent comment
2
u/Bitsoflogic May 31 '26
Probably somewhere between the two...
This is an example of a durable function:
The
flow() -> voidsignature means this is aflowfunction, which is durable. Eachawaitin these functions can take an indefinite amount of time, some of which may require a human to intervene.To reliably implement this, you have to persist to disk each
awaitstep in the function. Otherwise, a server crash would lose the state and kill any utility this provides. Generators would be used to replay the function and execute the next step.This behavior is the "included" part.
The container that launches as the durable workflow server can easily be seen with
docker ps, whereas a GC can't easily be seen. So, it's not as hidden. But everything running in that container is something the developer didn't have to think about.They just wrote
flowas part of their function signature and got a durable function. That's the "included" sense I was thinking of.