# 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="https://1303323730-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_J6oxfkTjM9Go4YNSW%2Fuploads%2FhXM9zp49w37GAK3o1gwh%2Fgorilla-tenant.png?alt=media&#x26;token=4e44ec6c-1ffa-4983-94e2-06b5bbf6fb24" alt=""><figcaption><p>ER Diagram PHEE Tenant</p></figcaption></figure>





