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

[alternative backplane] Create interfaces for distributed maps & hashmaps

Open luxe opened this issue 2 years ago • 4 comments

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.

luxe avatar Jan 15 '23 05:01 luxe

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.

luxe avatar Jan 18 '23 17:01 luxe

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.

luxe avatar Jan 19 '23 19:01 luxe

@werkt ready for re-review

luxe avatar Jan 28 '23 01:01 luxe

@luxe did you want to follow up with an updated version of this with Map<...> inheritance, or should this be closed?

werkt avatar Sep 25 '23 17:09 werkt