Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment Scenarios and Testing #97

Open
salotz opened this issue Jan 29, 2020 · 2 comments
Open

Deployment Scenarios and Testing #97

salotz opened this issue Jan 29, 2020 · 2 comments

Comments

@salotz
Copy link
Collaborator

salotz commented Jan 29, 2020

In order to design proper "process" backend abstractions it should be necessary to pin down exactly what kind of deployment strategies we want to support. Furthermore, this will actually give us a checklist of concrete kinds of tests we want to support.

There are 4 broad categories of actor deployment:

  • single process, single threaded, single host :: this is what plain old python without multiprocessing (or any future deGilled threading) provides. This is the most portable, but also the least useful, since presumably the point of using an actor model is for parallel computing.

  • single process, multi-threaded :: this would be using OS provided thread scheduling for parallelism. Not really possible with current python so we'll leave it out of the other ones.

  • multi-process, single host :: i.e. not-distributed. We only need to have a python environment on a single computing host. Uses OS IPC for communication.

  • multiprocess, multiple hosts :: i.e. distributed. Requires some method of deployment of python programs to hosts across a network. Uses network protocols for communication.

Deployment options:

First is what I call the "herd of unixen" of which there are multiple strategies for ranging from completely ad-hoc to completely software defined, in that order roughly:

  • "ponytail cowboy" style :: scp, ssh, perl, bash, and other manual sysadmin ways of replicating environments on other machines.

  • configuration management tool :: ansible, puppet, fabric, etc. which pretend to offer idempotency etc.

  • functional package managers with Ops :: Nix and Guix with NixOps etc.

  • linux containers :: docker, LXC, Rancher, etc.

  • VMs on Hypervisors :: Xen, VirtualBox, etc.

Of these the most reasonable are CM tools, functional package managers, and linux containers all having different tradeoffs for different scenarios. For initial testing purposes containers will probably be the easiest here since we don't actually need to set up VPSs or an RPi cluster.

Another non-unix approach is the use of unikernels like UniK, OSv, potentially Genode. IMO these have all of the benefits of containers with better encapsulation, smaller footprints, shorter startup times, and the potential to be "on the metal" and not have to compete for scheduling. The drawback is that they are underdeveloped in terms of tooling compared to something like Docker.

Of special interest is Genode, which actually can go beyond the unikernel use case that I won't detail here as it is very much a futuristic thing and a lot of the standard unix ways of looking at "processes" breaks down.

Another novel (and very appealing) scenario is that implemented in the mitogen project which can self-replicate python programs to any (unix) machine with a sufficient python version installed. Biggest drawback here is that I don't think you can do any FFI or rely on any subprocess calls to the system (without also using one of the above tools).

TODO: put links in

@goodboy
Copy link
Owner

goodboy commented Apr 28, 2021

Hmm, linking this to #149 which is basically a first attempt at this.

@guilledk just fyi.

@goodboy
Copy link
Owner

goodboy commented May 5, 2021

Some projects that might be helpful down the road @guilledk :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants