Skip to content

feat: Provide a way to run multiple persistent user-supplied processes at startup #106

Open
@theosanderson

Description

@theosanderson

TLDR: Convert /data/boot.d so that every script is run in parallel in the background, rather than sequentially.

Background:

I think that https://github.com/theosanderson/OTWebControlprovides a decent example of a pattern for deploying a tool that sits on top of a (normal) OT2 but allows one to do some specific task that the OT2 can't do by default (in this case receiving user input during protocol execution). In this case deployment consists of a few basic commands that:

  • clone a git repo
  • copy a file to /data/boot.d that starts a server on startup

While developing this I actually wanted to have two servers which were modularly quite distinct (a basic SimpleHTTPServer server for downloading data from the robot, and a separate server hosting a terminal). Initially I did this by creating two files in /data/boot.d but I realised that one would not start until the other was complete and so this could never have the two servers running concurrently. In my case I was able to solve this by creating a Python script that launches the two servers in different threads.

But if one imagines the creation of an OT2 ecosystem, someone might want to install my tool, above, and also a completely different tool from someone else that also hosts a server. As far as I can see there is no easy way for those to be launched at startup and run concurrently (I think I tried a script with /bin/server1 &; /bin/server2 &; and couldn't make it work .

So the feature is to convert /data/boot.d so that every script is run in parallel in the background. (Or to provide an alternative folder with that functionality).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions