Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(metadata service): Introducing Platform Events #4477

Merged
merged 18 commits into from Mar 30, 2022

Conversation

jjoyce0510
Copy link
Collaborator

@jjoyce0510 jjoyce0510 commented Mar 23, 2022

Summary
This PR introduces a new concept into the Metadata Service (GMS) of Platform Event. A Platform Event is a custom type of business (e.g. semantic) event that can be registered via the entity-registry. Platform Events are effectively platform-internal kafka events that can be emitted using the "producePlatformEvent" API of an EntityClient. When producing an event, its "name" and "payload" must be provided.

In contrast to MCP + MCL events, Platform Events do not imply any storage other than the event queue (e.g. Kafka). Platform Events are not automatically written to elastic or MySQL. Instead, it is assumed that they will be consumed from internal or external consumers of the Platform Event message stream.

Following a similar precedent to how aspects are serialized in generic fashion, Platform Events are serialized using the concept of GenericPayload inside of an envelope record called PlatformEvent, meaning that we can add and produce arbitrary platform events on a single topic (PlatformEvent_v1) without a schema registry change.

Changes

  • New type of event topic in GMS: Platform Event
  • Extend Entity Registry related components to support configuring, parsing, validating, and serving details about "EventSpecs"
  • APIs for producing platform events
  • Adding a "platform event consumer" process inside of MAE-consumer job. For now it's a no-op.
  • Updating entity registry related tests to verify platform events
  • Generalize GenericAspectUtils to GenericRecordUtils, since some logic is common between entity aspects and event payloads.
  • Re-brand EntityEventProducer -> EventProducer to generalize.
  • Re-brand EntityKafkaEventProducer -> KafkaEventProducer to generalize.

In coming PRs, we will add a few sample PlatformEvents which will more fully demonstrate their power!

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

@github-actions
Copy link

github-actions bot commented Mar 23, 2022

Unit Test Results (build & test)

  93 files  ±0    93 suites  ±0   18m 34s ⏱️ + 4m 41s
680 tests ±0  621 ✔️ ±0  59 💤 ±0  0 ±0 

Results for commit 2b0d0214. ± Comparison against base commit b843014.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Mar 24, 2022

Unit Test Results (metadata ingestion)

       5 files  ±0         5 suites  ±0   58m 32s ⏱️ +2s
   388 tests ±0     388 ✔️ ±0    0 💤 ±0  0 ±0 
1 787 runs  ±0  1 756 ✔️ ±0  31 💤 ±0  0 ±0 

Results for commit 2b0d0214. ± Comparison against base commit b843014.

♻️ This comment has been updated with latest results.

@jjoyce0510 jjoyce0510 merged commit c693105 into datahub-project:master Mar 30, 2022
maggiehays pushed a commit to maggiehays/datahub that referenced this pull request Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants