bazel-buildfarm icon indicating copy to clipboard operation
bazel-buildfarm copied to clipboard

[bwob] storage workers are recognized in the backplane

Open luxe opened this issue 4 years ago • 0 comments

Summary:

Workers register themselves to the backplane so that other workers can find and communicate with them.
Registering to the backplane has traditionally meant that a worker is a 'sharded CAS member', and is going to contribute to the overall cache. With the introduction of 'storage workers' and the preservation of our current workers, we will likely need to distinguish between them. We introduce the concept of 'worker types' via their capabilities, and allow the backplane to differentiate workers by type. The reason this is done is to support behavior such as:

  1. having our existing workers backup data to storage workers.
  2. have storage workers find other storage workers to perform replication.

We may choose to make execution and storage always exclusive in our worker pool, but I think keeping these possibilities open and expanding the backplane to keep track of all workers (not just cas-related) may be a good idea. Especially because the backplane is queried for reasons such as metrics.

Changes:

First we abstract the current worker map into a JedisHashMap. This is done to continue our encapsulation effort of jedis usage into data structures for more flexibility between different storage backends. Then we create a worker map for each worker type. Our traditional workers are called 'mixed type' workers because their capabilities allow both execution and storage. The public facing worker-related APIs remain the same for our current worker types. Differently configured workers will register to one of the new containers.

Overall Issue:

https://github.com/bazelbuild/bazel-buildfarm/issues/857

luxe avatar Jun 26 '21 23:06 luxe