Skip to content

Commit ba39d12

Browse files
committed
docs: ADR for adding event bus kafka cookiecutter
1 parent 1a5dbb9 commit ba39d12

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
7. Adding Cookiecutter for new Event Bus events and their kafka setup
2+
#####################################################################
3+
4+
Status
5+
******
6+
7+
Proposed
8+
9+
10+
Context
11+
*******
12+
13+
Adding new events to the Openedx Event Bus has taken a lot of time and effort in the past.
14+
Specifically, setting up local development with Kafka and connecting it correctly to the new provider,
15+
consumer, and topic has been a challenge.
16+
We want to make this process easier by creating a Cookiecutter template that can be used to
17+
quickly scaffold the necessary files and configurations for a new Event Bus event.
18+
19+
This approach involves not creating one new project directory, but instead code that can be copied
20+
into multiple existing repositories.
21+
22+
23+
Decision
24+
********
25+
26+
* We will add a new folder `cookiecutter/new-event-bus-kafka-event` to the edx-cookiecutters repository.
27+
28+
* This folder will contain subfolders for each of the following:
29+
- `openedx-events`: Contains the Open edX event definitions to be copied to the `openedx-events` repository.
30+
- `provider`: Contains the code for the new provider, as well as any necessary configuration files and environment
31+
variables needed to connect to the Kafka Event Bus, to be copied to the repository the new provider will be created in.
32+
- `consumer`: Contains the code for the new consumer, as well as any necessary configuration files and environment
33+
variables needed to connect to the Kafka Event Bus, to be copied to the repository the new consumer will be created in.
34+
Also includes a docker-compose file to run the consumer locally.
35+
36+
* Where needed, in the future we should add similar cookiecutter templates for the other Event Bus implementations,
37+
such as redis, rather than making duplicate work necessary every time a new event is added.
38+
39+
* We will add well-visible central documentation to Confluence to make it easy to find and use this cookiecutter template.
40+
41+
42+
Rejected Alternatives
43+
*********************
44+
45+
Keep template private
46+
=====================================================
47+
48+
* Since the Kafka implementation of the EventBus is part of Openedx, we should also
49+
make the cookiecutter template available to the Open edX community.
50+
51+
Supporting other Event Bus implementations
52+
=====================================================
53+
54+
Creating templates for multiple Event Bus implementations, including redis, is desirable in the future,
55+
but the immediate need is for the Kafka implementation. Doing the same for redis will need a new large effort.
56+
Currently, the config needed for Kafka has been surfaced by 2U discovery (Quokkas team), providing the knowledge
57+
needed to create the Kafka implementation template.

0 commit comments

Comments
 (0)