r/ProgrammingLanguages • • 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.

9 Upvotes

22 comments sorted by

View all comments

Show parent comment

8

u/prehensilemullet May 31 '26

The impression that developers don’t have to think about GC is an illusion.  When everything just works, it’s great.  But if there’s a memory leak, you have to use heap dumps or profiles to find it.  There can be other issues too, for example a recent change to Node/V8 made me have to manually configure the new generation size for best performance.

The same goes for a persistence mechanism.  A storage volume could fail, in which case developers need to be able to restore a backup onto a new volume and be able to attach that persisted data up to a new runtime.  The database could outgrow the volume.  The I/O throughput could end up being too high if you’re not careful.

But better yet, they would use streaming replication and automated failover (to separate compute instances/volumes) with their database, so that there’s less downtime if a volume or instance fails.

It’s generally easiest to use a managed database service for this, and I wouldn’t recommend trying to build full blown database management into your runtime.  It would be better to have an abstract interface for the persistence mechanism, and an implementation for the database you want, and allow the user to configure those for whatever database deployment they use.

3

u/Bitsoflogic May 31 '26

I'll have to think on these points a bit more. Thanks for the food for thought!