bazel-buildfarm
bazel-buildfarm copied to clipboard
[alternative backplane] Create interfaces for distributed maps & hashmaps
I'd like to use an alternative backend instead of redis. To make that possible, we need all of the distributed state to be redis agnostic. I've converted the RedisMap and RedisHashMap to interface types-- this will allow swapping in different data structure implementations.
See this discussion around the effort - https://github.com/bazelbuild/bazel-buildfarm/issues/665 There is more to do, like isolating the Redis pub/sub from the backplane, ensuring the queues are behind an interface, etc.
It looks like you're trying to create a capture interface with the least involvement in changes on the Redis side - I'd prefer fixes to the usage to make a smaller/simpler interface spec than just the min spec.
haha that's exactly what I was trying to do. Okay, let me follow up with smaller interfaces.
It looks like you're trying to create a capture interface with the least involvement in changes on the Redis side - I'd prefer fixes to the usage to make a smaller/simpler interface spec than just the min spec.
haha that's exactly what I was trying to do. Okay, let me follow up with smaller interfaces.
I've combined the interfaces and made everything just a DistributedMap.
@werkt ready for re-review
@luxe did you want to follow up with an updated version of this with Map<...> inheritance, or should this be closed?