Event (MS)

Structure

Apache Avro and Google’s Protobuf

Design

  • include the whole truth
  • keep events atomic

Types

  • unkeyed: no key, value
  • keyed: unique key, value
  • entity: unique key, value, unique value

Stream

multiple events → Event stream (ms)

Materializing state

→ saving all entity events in order into a table

  • delete: tombstone → keyed event with value = null

Compacting

avoid infinite event history → compact the list

  • only pick latest event for each event type
  • if event = tombstone, skip it