-
Notifications
You must be signed in to change notification settings - Fork 12
Microservices Overview
tien.nguyen edited this page Jul 30, 2026
·
1 revision
The Emporia Trading Platform is decomposed into 9 autonomous microservices plus a shared contracts library and a modern React trading frontend.
-
Technology: Spring Boot 4.0.7, Spring Security OAuth2 / OIDC Server, PostgreSQL (
emporia_authorisation). -
Function: Handles user identity authentication, token issuance (JWT / OIDC with PKCE), user registrations, client credential management, and role-based permissions (
ROLE_TRADER,ROLE_ADMIN).
- Technology: Spring Cloud Gateway, Reactive Netty stack.
-
Function: Unified entry point for client applications. Handles OAuth2 token verification, route forwarding, CORS headers, and path filtering (
/api/static/**,/api/orders/**, etc.).
-
Technology: Spring Boot 4.0.7, Spring Data JPA, PostgreSQL (
emporia_static_data). - Function: Manages instruments, exchange listing details, tick sizes, lot sizes, trading hours, and symbol metadata. Serves snapshot endpoints consumed by Order Command, Market Data, and Execution services.
-
Technology: Spring Boot 4.0.7, Spring Data JPA, PostgreSQL (
emporia_client_config). - Function: Stores personalized user settings, watchlists, workspace layouts, chart configurations, and UI notification preferences.
- Technology: Spring Boot 4.0.7, gRPC, Protobuf, Server-Sent Events (SSE).
- Function: Aggregates level-1 and level-2 quotes from external FIX protocol simulators and Alpaca IEX feeds. Distributes realtime tick data over HTTP SSE streams and gRPC channels.
- Technology: Spring Boot 4.0.7, Spring Kafka, RestClient.
-
Function: Validates inbound trade commands (CREATE, MODIFY, CANCEL) against static data listings, generates unique correlation IDs, and produces commands onto
emporia.order.commands.v1Kafka topic.
-
Technology: Spring Boot 4.0.7, Spring Data JPA, PostgreSQL (
emporia_order_data), Spring Kafka. -
Function: Core state machine for trading orders. Persists
TradingOrderlifecycle state, consumes execution fills, handles race conditions between cancels and fills, and publishes immutable order events toemporia.orders.v1.
-
Technology: Spring Boot 4.0.7, Spring Kafka, LMAX Disruptor (
exchange-coreintegration). - Function: Order routing engine. Evaluates order execution strategies (SMART, VWAP, DIRECT) and routes order slices to exchange matching engines or simulated venues.
-
Technology: Spring Boot 4.0.7, Spring Data JPA, PostgreSQL (
emporia_portfolio). - Function: Consumes execution events to track real-time positions, realized/unrealized P&L, account cash balances, and margin requirements.
- Type: Shared Java Library & Protocol Buffers Specification.
-
Function: Defines core domain events (
OrderCreated,OrderFilled,OrderCancelled), Kafka command payloads, and gRPC Protobuf definitions. Shared across all backend Java microservices.
- Technology: React 19, TypeScript, Vite, TailwindCSS / Custom CSS design system.
- Function: Real-time trading UI containing order book depth widgets, interactive charts, order entry forms, execution history, and portfolio position tables.
- Trading Terminology Glossary
- Order Lifecycle & Validation
- Order Routing & SOR
- Market Data & Pricing
- Portfolio & Risk Management
- Architecture & Order Flow
- Static Data Service
- Market Data Service
- Order Command Service
- Order Management Service (OMS)
- Execution Service
- Portfolio Service
- Design Patterns
- Microservices Overview
- Exchange-Core Integration
- Testing & Verification
- Deployment & Operations
- Repository: emporia
- Tech Stack: Java 21 | Spring Boot 4.0.7 | React 19 | Kafka | gRPC
- Coverage: 91.95% JaCoCo