Jump to content

Architecture:MediaWiki/processing layer

From mediawiki.org

The processing layer is responsible for facilitating between the behavior layer and the storage layer in situations where the storage layer cannot be accessed directly. In particular, it is responsible for dispatching, asynchronous processing, and batching. As such, the hook system and the job system belong here.

Status:

As per August 2020, several components of the processing layer are well -established. However, the idea of a separate layer for processing is not explicit anywhere in the code base.

Constraints:

Code in the processing layer should not make use of code in layers above it, such as the behavior layer or the user interface layer. In particular, it should not make use of localization, though it may apply internationalization.

Dependencies:

Code in the processing layer typically depends heavily on the storage layer.

Typical patterns:

An important pattern defined in the processing layer is the job pattern. However, it should be noted that the processing layer only defies the idea of jobs and the infrastructure for processing them. Concrete jobs are generally implemented in other layers, most importantly the behavior layer.

Example:

An example of storage layer code is the DeferredUpdates class.