Serverless binaries

Distributed binary objects. Two possibly exclusive concepts:

  • Concept 1: shard the data, execute the code near the data.
  • Concept 2: distribute cpu load across machines.

Component: Worker daemon

Responds to multiple requests over the network. Like a web server but protobuf instead of http. Processes are spawned chrooted and containerized (https://ericchiang.github.io/post/containers-from-scratch/):

  • int chroot(const char *path); (unistd.h)
  • int unshare(int flags); (sched.h)
  • int setns(int fd, int nstype); (sched.h)
  • cgroups (manage via systemd?)

Messages are sent to workers. Messages include an identifier of the binary object to execute. If the worker does not have that binary object it requests it from it's coordinator. Binary objects (shared object files) are transmitted across the network and dynamically loaded (do they need to hit the disk?).

Worker daemon on physical machines

Multiprocess application. Manages number of forks/threads dynamically according to rules. Code shipped to daemon remotely. Shared object files transmitted across the network. Dynamically loaded by daemon. Each fork/thread chrooted and containerized.