stream-registry icon indicating copy to clipboard operation
stream-registry copied to clipboard

Updates to metadata are consistent

Open neoword opened this issue 6 years ago • 2 comments

Desired Behavior

Metadata updates should have read-your-writes consistency

Benefits

  • No more hacky sleeping of time to ensure updates are propagated
  • Client acknowledgements are consistent (subsquent reads have the side-effect or someone else's newer updates)

neoword avatar Feb 09 '19 02:02 neoword

I presume this is not possible when using a Kafka compacted log as a backend?

teabot avatar Apr 03 '19 13:04 teabot

Its 'possible...' with some interesting techniques. 😄

For example, the resource can "block-and-wait" for a promise with a timeout. The promise waits for a read for the given commandId to make it through the metadata. Once the promise succeeds, you have achieved read-your-writes consistency. If the promise timesout, well, the client is on its own...(with a recommendation that failure is eventually-consistent... the "write succeeded" it just hasn't propagated to the read yet).

I expect this later corner case to happen rarely in practice (e.g. when the embedded stream processor has gone haywire for whatever reason).

neoword avatar Apr 03 '19 14:04 neoword