-
Notifications
You must be signed in to change notification settings - Fork 187
Description
Proposal Date
23 September 2024
Ticket Acceptance Date
23 October 2024
Technology Removal Date
2025-2027
First Open edX Named Release Without This Functionality
TBD
Rationale
The Course Discovery Service provides a variety of optional functionality in Open edX, some of which is required for other services like the edx-enterprise suite. However, the fundamental architecture of the discovery service has proven to be problematic, and it is currently a limiting factor that makes it much more difficult than it should be to develop and integrate custom functionality for the Open edX platform such as ecommerce, enterprise integrations, subscriptions, and programs.
Here are some of the problems with its current architecture:
-
Non-default: The discovery service is not installed by default on most instances of Open edX, which means that "core" functionality is never built using its APIs.
-
Out of Sync Course Data: Fundamentally, the discovery service maintains at least two separate sets of models about courses (i.e. the
Coursemodel in its MySQL database, and theCourseRunDocumentin Elasticsearch). Though there are various systems for keeping this data in sync with Studio (which holds the actual "source of truth"), they are imperfect and synchronization issues are a frequent source of bugs and errors. -
Bi-directional sync: Because the discovery service is the source of truth for some pieces of data, it actually syncs its data to Studio as well as from Studio. This has caused a variety of issues, including bugs with an infinite cycle of updates.
-
Other Redundant/Conflicting Data Models: The discovery service has its own database tables for storing important data that is already stored by Studio/LMS (Discovery
Organizationvs. CoreOrganization,Modevs.CourseMode,Personvs.UserProfile,CourseEditorvs.CourseAccessRole). Often, these models have either subtle or substantial differences from the Studio/LMS version, and there is no guarantee that they are in sync at all.- Part of the reason this problem has arisen is that there was historically no good mechanism to extend the models in the core platform (and their corresponding APIs) using plugins.
-
Competing APIs: some operations like "list courses available to me" can be done with the core platform APIs, the discovery service APIs, or the edx-enterprise APIs. Needless to say, they have different behavior, functionality, caching, etc.
-
Kitchen Sink / edX-Specific Functionality: The Course Discovery Service includes, in no particular order:
- hard-coded edX-trademarked program types
- hard-coded course run types like
paid-bootcampandbootcamp-2u(not to be confused with Tracks, Modes, or Seat Types which are all related) SubjectTopicFactCertificateInfo- SEO Metadata
- "Taxi" (2U form library) lead capture data
- random 2U "additional fields"
- Collaborators
- Product Value data (for Cost-per-click??)
- product GeoLocation
- Course location restriction
- "CourseReview model to save Outcome Survey analytics coming from Snowflake"
- Entitlements
- Corporate Endorsements
- Program Subscriptions
- Degrees
- Curriculum
- Pathways
- Person's Social Networks
- an "API Client...to communicate with google spread sheets and drive images"
- some Salesforce thing
- various functionality built on Algolia
- and many more things.
It may be the case that the platform lacked ready-to-use extension points at the time these features were required, but they should have been built as extensions regardless.
-
Problematic Programs implementation: If you want to group courses together into a "Program", you can do so using the discovery service programs feature. However: it is not well documented; it is limited in functionality; its only management UI is the Django admin; it is not flexible and only supports 2U's original use cases; and it depends on various other apps like a marketing site, ecommerce, etc.
Removal
The entire Course Discovery microservice and the corresponding code in edx-platform that integrates with it. However, see below - this is not going away anytime soon.
Replacement
To rectify this situation, this proposal calls for a series of improvements to the Open edX core (edx-platform and openedx-learning, etc.) that add a "catalog" feature and focus on improving platform extensibility, so that the kitchen sink of features listed above could be largely built using plugins. At the same time, the Discovery service would be officially deprecated.
New Flexible Catalog App
To replace one of the core features of the Discovery Service, a new "Catalog" application should be built into the core platform. The purpose of this app is to provide a unified API for answering the question of "What courses are available to me?". It should be extensible using plugins so that things like Subscriptions and Enterprise Licensing can be accounted for.
This catalog app may also have a flexible concept of "programs" which are essentially groups of related courses, but where each program can define requirements like "pass course A then B, then either C and/or D in order to complete the program." Significant product research and planning is required to define such requirements in more detail.
The catalog app should be developed with "micro-courses" in mind as well - courses significantly smaller than the average MOOC and more like a "Section" of today's typical courses.
The detailed design of the catalog app will happen in future ADRs (and/or an OEP) if this DEPR proposal is accepted. There is already a draft of one initial ADR to add an edx-platform representation of "Catalog Courses".
Extending Core Models
Many of the other "kitchen sink" features listed above were developed in the Discovery service because there wasn't a better place to put them at the time. Instead of finding the least bad place to put specialized functionality like this, we should modify the platform so that the core models can be extended by plugins.
For example, a plugin should be able to add custom fields to the UserProfile model, and have these fields (optionall) show up anywhere user profiles are seen or edited. Likewise the core Course model should be extensible, so a plugin could add (e.g.) a "Price" field to each course and choose to have it show up in the catalog API data, the default catalog UI (when user's browse for courses), and the default course "Advanced Settings" UI. The Open edX Hooks Extension Framework already provides some mechanisms for this, but others will need to be proposed in future ADRs/OEPs.
Roles & Permissions
Achieving a good implementation of a core catalog app and extensible core models will almost definitely depend on a major refactor of roles and permissions, the lack of which has been a long-standing pain point in Open edX.
Deprecation
Deprecating the Discovery Service now means three things:
First, proposing any new functionality for the Open edX Project whose implementation depends on the Discovery Service would be rejected.
Second, maintenance of the Discovery Service would become entirely the responsibility of those organizations that [still] use it (e.g. 2U).
Third, eventually the corresponding hooks and integration code in edx-platform (e.g. sync code, "programs cache, etc.) would be removed. This is likely many years away (see below). However, if this DEPR is accepted, we will make an effort to flag all of this code and corresponding APIs so that it's clear it will be eventually removed, and should not be used for implementing new functionality.
Migration
For any functionality that currently depends on the Discovery Service (e.g. "Programs"), there will be no effort to remove corresponding integration code from edx-platform until an alternative approach along the lines proposed has been developed, stablized, and released for enough time that organizations have a reasonable migration path. Details of that will depend on the implementation. Those who currently depend on the discovery service for functionality critical to their organization may continue to use it for foreseeable future, provided they are able to contribute to its ongoing maintenance.
The goal of this DEPR proposal is not to take the discovery service away as soon as possible, but to focus community resources on developing a better alternative, and to encourage stakeholders to avoid building any new features on top of the discovery service from this point forward.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status