Middleware Pipeline Overview

Quantum Server is a pass-through system. Whenever a client sends a request, the server routes the request to an external data source (a Database, MongoDB, JSON service) and sends back the back-end response to the client.

  • Quantum Server does not generate responses; however, it receives the external source's result and sends to the client. During this stage, the Server must process each request before it is sent to the external data source and each response before it is sent to the client.
  • The middleware pipeline is divided into different layers, and each layer has its functionality, which applies transformations required for request and response objects.
  • Each layer is responsible for transforming requests and responses.
  • Each request and response object is propagated through these layers sequentially to apply transformations, as shown in the following flow diagram.

Middleware Pipeline Flow Diagram

The following middleware flow diagram details all the layers involved in the request and response transformation process:

 

  • A client request passes through a series of different middleware layers before the request is sent to the data source.

    Request pass-through process system

     

    Client

    Start

    1

    2

    3

    4

    5

    End

    Request

    Filters

    Data Controller

    Data Processor

    Connector

    Data Provider

    Data Source

 

  • A data source response passes through a series of different middleware layers before the response is sent to the client.

    IMPORTANT: The sequence of layers processed for the response is in the request's opposite direction.

    Response pass-through process system

     

    Client

    End

    5

    4

    3

    2

     

    1

    Start

    Request

    Filters

    Data Controller

    Data Processor

    Connector

    Response

    Data Provider

    Data Source

 

Layers in Middleware Pipeline