Skip to content

Support MergeOperator #328

@dmvk

Description

@dmvk

To use SlateDB as a fully-featured state backend for a stream processor, we need to support three main types of state:

  1. Value (Latest Value, Aggregating State)
  2. List / Bag / Buffering
  3. Map

Traditionally, state-of-the-art implementations built on top of RocksDB have leveraged the MergeOperator [1] to efficiently handle types 1 and 2.

A key example is List state, where we append elements continuously until it's time to trigger a computation—like when a window fires.

For Value state, the MergeOperator can also be useful for efficiently managing aggregating states. It allows us to defer computations until we actually need the result—such as calculating a maximum value when a large window closes. This approach can be quite effective, particularly for operations where we only need the final outcome.

While this isn't always the absolute optimal method, it's a solid foundation for future iterations and improvements.

[1] RocksDB Merge Operator

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions