Skip to content

Commit 470b045

Browse files
committed
docs: Adds ADR 11. Course and block data
1 parent df0b52c commit 470b045

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
11. Course and block data
2+
#########################
3+
4+
Status
5+
******
6+
7+
Accepted
8+
9+
Context
10+
*******
11+
12+
Aspects needs a way to access up-to-date course and block metadata in order to display human-friendly labels and data to
13+
instructors in a way that makes sense in the context of their course.
14+
15+
The tracking event data that Aspects processes contains "object IDs", or string representations of UsageKeys that
16+
identify the piece of content the event relates to. But these UsageKeys are not very legible to humans, and the metadata
17+
for that content (display title of the block, title of the course it appears in, its position in the course, etc.) is
18+
part of the context where these events occur, and is not stored in the events themselves.
19+
20+
Example:
21+
22+
*"As a course author, I need to know how many times the videos in my course have been viewed so I can see which videos are
23+
the most helpful (or the most confusing)."*
24+
25+
Aspects receives tracking events every time someone watches a video, and so the videos watched can be counted purely
26+
from these tracking events. However, videos which haven't been watched won't appear in the tracking events. To include
27+
these unwatched videos in our chart, Aspects needs a way to query a course for all the video blocks it contains.
28+
29+
Open edX sends signals (which, confusingly, are also called "events", see OEP-41) when some actions are taken on the
30+
platform, including publishing a course, or updating a course outline. These signals can be used to tell Aspects when
31+
its course or block data needs to be updated.
32+
33+
Decision
34+
********
35+
36+
Use Open edX's "course published" signal to trigger updating course outline and block relationship data stored in
37+
Clickhouse. This approach is supported by `OEP-50 Hooks extension framework`_, and will be compatible with deployments
38+
that use the Event Bus to manage signals sent between applications.
39+
40+
Consequences
41+
************
42+
43+
#. Create an "event sink" which uses course and/or block signals from within the LMS/CMS to trigger course and block
44+
data synchronization to Clickhouse.
45+
#. This "event sink" will run as a plugin on Open edX, and so has access to its models and data, which it can query and
46+
package up for insertion in Clickhouse.
47+
#. Aspects will create custom views into this course and block data to ensure that the most relevant information is
48+
easily available to the datasets.
49+
50+
Rejected Alternatives
51+
*********************
52+
53+
**Use course graph**
54+
55+
Previously Aspects used the `coursegraph`_ application in Open edX as the source of truth for course outline and block
56+
relationships.
57+
58+
The synchronization script had to be run regularly in order to keep the data up-to-date.
59+
60+
However as the Aspects project has grown, course data isn't the only Open edX data that Aspects needs a copy of. So the
61+
more general solution of "event sinks" was preferred.
62+
63+
References
64+
**********
65+
66+
.. OEP-41 Asynchronous Server Event Message Format: https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0041-arch-async-server-event-messaging.html
67+
.. OEP-50 Hooks extension framework: https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0050-hooks-extension-framework.html
68+
.. OEP-52 Event Bus Architecture: https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0052-arch-event-bus-architecture.html

0 commit comments

Comments
 (0)