Background

There are many reasons events on a node/machine could trigger a job. Some examples:

The Bacalhau agent, running locally, could handle many of these tasks but first require the Bacalhau network to be notified.

Options

The Bacalhau agent could be useful in the event flow in several ways:

  1. Watch a given descriptor for changes
  2. Have a local pipe that could be triggered by a process
  3. Have a websocket that only responds/listens on localhost

Once the agent is triggered, we have two paths to execute a job:

  1. The agent begins the work immediately, and publishes the results
  2. The agent contacts the server, which schedules the job to begin and selectively chooses the exact node that triggered the event to run it on

For our initial MVP, we will do #1 and #2 from the above.

Flow