# Data Architecture

Payment hub follows a headless architecture in which transactional services store data asynchronously into real-time analytics and OLTP datastore. Orchestration (Zeebe) engine's embedded database (RocksDB) stores execution (workflow) variables and states of a transaction.&#x20;

A Kafka Exporter exports orchestrator's independent event streams to Kafka. This is then streamed by importer services and persisted into both relational database (MySQL) and realtime search / analytical data store (Elasticsearch). This data then can be used for operational and analytical use cases.

Prometheus serves as a store for performance monitoring of the stack (especially for the orchestrator).

The business logic are encapsulated into Zeebe workers and assembled together in use case and implementation flows (configurations dragged and dropped in a modelling tool called Zeebe modeller). These transactional flows are completely separated from the data storage and retrieval mechanisms. Data stored within Elasticsearch is in real-time and is eventually consistent.&#x20;

### ER Diagram of RDBMS

The payment hub supports multi-tenant data isolation at the database level

<figure><img src="/files/dB8RYlSb4lQIhRv9BKPv" alt=""><figcaption><p>ER Diagram PHEE Tenant</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mifos.gitbook.io/docs/payment-hub-ee/overview/data-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
