Skip to content

Commit

Permalink
docs: add diagram for illustrating how filters work
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Nov 18, 2024
1 parent 9335852 commit 8a29483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Binary file added docs/_images/openedx-filters-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions docs/concepts/openedx-filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ The pipeline mechanism is implemented by a class called `OpenEdxPublicFilter`_,
How do Open edX Filters work?
-----------------------------

Open edX Filters are implemented using an accumulative pipeline mechanism, which executes a series of functions in a specific order. Each function in the pipeline receives the output of the previous function as input, allowing developers to build complex processing logic by chaining multiple functions together. The pipeline ensures that the order of execution is maintained and that the result of a previous function is available to the current one in the form of a pipeline. The filter execution process follows these steps:
Open edX Filters are implemented using an accumulative pipeline mechanism, which executes a series of functions in a specific order. Each function in the pipeline receives the output of the previous function as input, allowing developers to build complex processing logic by chaining multiple functions together. The pipeline ensures that the order of execution is maintained and that the result of a previous function is available to the current one in the form of a pipeline. In this diagram, we illustrate the workflow of Open edX Filters:

.. image:: ../_images/openedx-filters-workflow.png
:alt: Open edX Filters Workflow
:align: center

The workflow of Open edX Filters is as follows:

#. An application component (caller) invokes the filter by calling the ``run_filter()`` method implemented by the filter definition.

#. The ``run_filter`` method calls the pipeline tooling under the hood, which manages the execution of the filter's pipeline.
#. The ``run_filter`` method calls the **Pipeline Tooling** under the hood, which manages the execution of the filter's pipeline.

#. The filter's tooling retrieves the configuration from ``OPEN_EDX_FILTERS_CONFIG``, which defines a list of N functions :math:`f_0, f_1, \ldots, f_{n-1}` that will be executed.

Expand Down

0 comments on commit 8a29483

Please sign in to comment.