MATIH Platform is in active MVP development. Documentation reflects current implementation status.
1. Introduction
Backend Stack

Backend Stack

The MATIH Platform backend is polyglot, using three programming languages across 24 microservices. Java dominates the Control Plane and data-intensive Data Plane services, Python powers the AI/ML services, and Node.js handles rendering. This section documents the backend technologies, frameworks, and shared libraries.


Language Distribution

LanguageVersionService CountServices
Java21 (LTS)17All Control Plane (10), Query Engine, Catalog, BI, Pipeline, Semantic Layer, Data Plane Agent
Python3.116AI Service, ML Service, Data Quality, Governance, Ontology, Ops Agent
Node.js20 (LTS)1Render Service

Java Stack

Core Framework

ComponentTechnologyVersion
Application frameworkSpring Boot3.2
SecuritySpring Security + custom JWT--
PersistenceSpring Data JPA + Hibernate--
CachingRedis via TenantAwareCacheManager--
MessagingApache Kafka (via commons-java)--
Build toolGradle8.x
Container imageDistroless Java base--

Key Java Libraries

LibraryPurpose
commons-javaSecurity, multi-tenancy, persistence, caching, event streaming
JacksonJSON serialization/deserialization
HibernateORM with schema-based multi-tenancy
MicrometerMetrics collection for Prometheus
OpenTelemetryDistributed tracing instrumentation
Resilience4jCircuit breaker and retry patterns

Java Service Patterns

All Java services implement a consistent set of patterns from commons-java:

PatternImplementation
Security filter chainSecurityFilter --> JwtAuthenticationFilter --> TenantContextFilter --> RbacFilter
Tenant contextTenantContextHolder with ThreadLocal storage
Health checksSpring Boot Actuator with deep component checks
Structured loggingTenant-enriched JSON logs via StructuredLoggingConfig
API response envelopeConsistent success, data, metadata structure
Error handlingGlobalExceptionHandler with typed ErrorResponse

Python Stack

Core Framework

ComponentTechnologyVersion
Web frameworkFastAPILatest
Async runtimeuvicornLatest
Tenant contextcontextvars (stdlib)--
LLM orchestrationLangChain, LangGraphLatest
ML computeRay2.9+
Build toolPoetry / pip--

Key Python Libraries

LibraryPurpose
commons-pythonAuthentication middleware, tenant context, structured logging
commons-aiLLM abstractions, prompt management, RAG utilities
LangChainLLM integration and chain orchestration
LangGraphMulti-agent state machine orchestration
PydanticData validation and serialization
SQLAlchemyDatabase access (where needed)
httpxAsync HTTP client for inter-service calls

Python Service Patterns

PatternImplementation
Tenant contextcontextvars.ContextVar for async-compatible context
AuthenticationMiddleware extracts JWT claims and sets tenant context
Health checks/health endpoint with dependency verification
Structured loggingJSON logs with tenant context enrichment
Async handlersasync def route handlers for non-blocking I/O

Node.js Stack

Core Framework

ComponentTechnologyVersion
RuntimeNode.js20 (LTS)
Web frameworkExpressLatest
Chart renderingD3.js, Chart.js--
PDF generationPuppeteer--

The Render Service is the only Node.js service. It handles server-side chart rendering, PDF export, and dashboard thumbnail generation.


Container Strategy

All services use a consistent container strategy:

AspectApproach
Base imagesDistroless (Java), python:3.11-slim (Python), node:20-slim (Node.js)
Multi-stage buildsBuild stage compiles, runtime stage is minimal
Non-root executionAll containers run as non-root users
Health probesLiveness and readiness probes on all services
Resource limitsCPU and memory limits set via Helm values

Related Pages