Skip to content

[DEPR]: Replace cs_comments_service #437

Open
@regisb

Description

@regisb

Proposal Date

2024-04-16

Target Ticket Acceptance Date

2024-10-16

Earliest Open edX Named Release Without This Functionality

Sumac - 2024-10

Rationale

The Open edX forum is an essential feature of the platform. In technical terms, it is a web application that is developed in the cs_comments_service repository. This application is implemented in the Ruby programming language. Only a few Open edX contributors have expertise in Ruby: most developers are skilled in Python and NodeJS. This makes it extremely difficult to implement new features and extend the forum.

Moreover, the cs_comments_service application currently stores data in MongoDB, which is neither a consistent or a relational data storage solution -- as opposed to MySQL. This results both in operational and architecture complexity, as some data needs to be synced up between the two data stores (notably for user data).

Removal

The cs_comments_service repository will be removed. Note howerver that the tutor-forum plugin will be maintained, though it will be considerably simplified.

Replacement

The Ruby application will be replaced by a Django app, currently being developed in the following repository: https://github.com/edly-io/forum/ (soon to be migrated to the openedx organization, as per this public-engineering issue).

Deprecation

The cs_comments_service repository will include a deprecation notice in its README file. Migration will be transparent for most users running Tutor, as the tutor-forum plugin will smoothly transition from running the former ruby app to installing the new forum application in the edx-platform runtime.

Migration

Strategy

Let's call the legacy cs_comments_service "forum v1" and the new forum application "forum v2".

In forum v1, edx-platform communicates with the Ruby application via an HTTP rest API. All calls are made from the backend, Client-side API calls are made to edx-platform, which then forwards parts of the requests to forum v1.

In forum v2, these API calls take the form of a native Python API. This is made possible by the fact that the forum v2 application is installed in the same runtime as edx-platform.

image

This means that the diagram above will remain the same in the transition from v1 to v2. The only difference is that in step 3, communication will change from an HTTP API call to a native Python function call.

For storage, forum v2 will implement two different backends: one for MySQL (in the form of Django models) and one for MongoDB. The MongoDB backend is only preserved to ease the transition from v1 to v2; it is expected that it will be eventually removed.

Opt-out

Forum v2 will make use of two CourseWaffleFlag (source code). For every course, platform administrators will have the choice to:

  1. Send HTTP requests to the forum v1 app or native API calls to the forum v2 app.
  2. If calling the forum v2 app, use either the legacy MongoDB backend or the new MySQL backend.
  3. Run a dedicated migration command that will copy the course data from MongoDB to the new MySQL models.

By default, users running Tutor (and the tutor-forum plugin) will automatically transition from v1 to v2 and the MySQL models. In that sense, the transition is opt-out rather than opt-in.

Proposed timeline

  • July - October 23rd 2024: implementation of forum v2
  • October 23rd 2024: Forum v1 marked for deprecation: no new change accepted in the cs_comments_service repository.
  • October 23rd - December 9th 2024: Sumac testing, fixing issues in forum v2.
  • December 9th 2024: Sumac release
    • By default, Tutor will run forum v2. The storage backend will depend on whether or not it's a new tutor installation
      • Existing platforms will keep using MongoDB: instructions to migrate will be printed on tutor ... launch and be available in the tutor-forum README.
      • New platforms will default to the MySQL backend.
    • It will be possible to override this default behavior on a course-per-course basis.
  • December 2024 - April 2025: all platforms are expected to migrate from forum v1 to forum v2, with the MySQL storage backend.
  • June 2025: Teak release:
    • the forum v1 integration is removed from edx-platform
    • the mongodb backend is removed from forum v2

Additional Info

Task List

Metadata

Metadata

Assignees

Labels

deprProposal for deprecation & removal per OEP-21

Type

No type

Projects

Status

Breaking Changes Unblocked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions