Refactor StateBackendClient
to be a higher-level interface
#554
Labels
enhancement
New feature or request
StateBackendClient
to be a higher-level interface
#554
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)
Currently, persistent state is managed using the
StateBackendClient
trait which is very low-level interface over a key-value store. This is quite flexible but has a couple of drawbacks:MemoryBackendState
everything is kept in memory so there is no real reason why anything needs to be serialized toVec<u8>
For example, it's possible with a Redis as a backend to do global task slot allocation atomically and without any distributed locking using HMap and a little bit of server-side scripting. But there is really no way to express that using the current interface.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Break the current
StateBackendClient
trait into two separate higher-level interfaces:This is only a sketch and these interfaces may need to be tweaked in various ways, but I think the benefits of the general approach are significant:
Note that the above traits don't have a way to
Watch
keys. I think the only place we use that is for listening to executor heartbeats and I think that can be internalized into theClusterState
implementation but if not it should be easy to work into this design.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
We could not do this
Additional context
Add any other context or screenshots about the feature request here.
As briefly mentioned above this is mostly coming from the desire to make Ballista truly highly available. The basic outline of the HA solution is pretty straightforward:
The text was updated successfully, but these errors were encountered: