# Architecture

## High-level Infrastructure

The Orange system receives invocation requests from applications with specific models and datasets.&#x20;

First, it invokes the model specified in the invocation request by sending a request to the service set up by the **Model Provider (MP).** &#x20;

Next, based on the selected [**Data Provider**](https://docs.orangeprotocol.io/glossary#data-provider) **(DP)** and [**dataset**](https://docs.orangeprotocol.io/glossary#datasets), the system fetches data using an interface provided by them. After the calculation is complete and a result is generated, the system stores the result temporarily till it is fetched by the application.

{% hint style="info" %}
The system processes model invocation requests in the form of **tasks.** Each task corresponds to an individual [**Decentralized Identifier**](https://docs.orangeprotocol.io/glossary#did) **(DID)** **or wallet address.** Refer to the [**integration guide here**](https://docs.orangeprotocol.io/developers/within-your-system) for details.
{% endhint %}

The application can then proceed to fetch the result in its raw form (data object), or send a request to export it in the form of a verifiable credential or NFT.&#x20;

The following figure illustrates how the different components that make up the Orange system are connected and interact with each other.

![](https://3912908296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg8zjiA8y_LrPWWUpa_%2Fuploads%2FxQvskKQ7jNgqtlOnGz97%2FCopy%20of%20orange-high-level-arch.jpg?alt=media\&token=5fc1fcdf-5980-45fd-8202-96876080ab0f)

Let's go over each component individually.

#### GraphQL API Server

The interface for applications to interact with the Orange system. It serves the following purposes:

* Fetching details of registered [**Model Providers**](https://docs.orangeprotocol.io/glossary#model-provider) **(MP)** and [**Data Providers**](https://docs.orangeprotocol.io/glossary#data-provider) **(DP)**
* Fetching details on publicly available models and datasets
* Sending calculation requests
* Fetching the generated results

#### DP Manager

A service module that **DPs** primarily interact with. The **DP manager** performs the following functions:

* Preliminary verification and docking
* Data interface invocation to fetch and query data

#### MP Manager

A service module that **MPs** primarily interact with. Enables the following features:

* Preliminary verification and docking
* Execution request handling
  * **WASM based:** Fetches a binary file for the model and performs service execution in an integrated execution environment
  * **Custom:** Invokes a standalone server deployed by the **MP** for service execution. Invocation via a **RESTful/RPC API**.

#### Dispatcher

A service module that basically handles all the requests from applications. It interacts with other components to perform a number of functions:

* Fetches data from a specified **DP** after receiving a data request
* Sends execution requests to a specified **MP** after receiving calculation requests
* Sends the results generated by the **MP** to the **reputation minting service** for further processing

#### Reputation Minting Service

A service that takes the calculation results produced by **MPs** and generates a specified form of verifiable proof. Some examples would be:

* Verifiable Credentials
* NFTs

**Blockchain**

Represents the ledger network where records are maintained. For instance,

* Record of a verifiable credential issued to a [**DID**](https://docs.orangeprotocol.io/glossary#did)
* Deploying NFT contracts that mint tokens based on the reputation assessment reports received from the Orange system
