openedx / openedx/openedx-events

Discovery: Implement MVP of an outbox pattern for the event bus

Open
#251 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

event-bus
Dominant language
Python
Stars
13
Forks
33
Avg merge
14h 37m
Merged PRs (30d)
4

Description

A/Cs:

At this time, there is not a great story for recovery from event producing issues if the event bus (Kafka, Redis, etc.) were to temporarily go down.

A common solution for this is an Outbox Pattern, where event data is first sent to the database, and a separate process sends events from the outbox to the event broker, maintaining order. This ticket is for implementing an MVP of this pattern.

Notes/Questions:

  • Another ticket, https://github.com/edx/edx-arch-experiments/issues/354, to document/implement a less ideal work around, but this fix is likely to be much more dependent on environment.
  • To maintain order, the simplest implementation is to have a singleton process that reads from the outbox and produces the events.
    • What can this handle for typical load?
    • What can this handle for a large incident?
    • When would we need to invest in being able to have multiple processors (e.g. that handle different topics)?
    • Would we need a capability to move or keep certain topics with large load and less essential events off the outbox?
  • When do we delete events from the outbox?
  • Where is the code for this going to live? Do we want this to be in a library?
  • Note: there are many articles we can review to learn from others.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named in the issue. Start with the linked ADR and stakeholder discussion, then review the existing event-bus implementation and the related workaround issue. Done means proposing a set of implementation tickets that addresses the MVP scope and records the unresolved operational decisions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.