How apache/unomi works
Project type and purpose
• This is a modular, full-stack “Context Server” (a Customer Data Platform) implemented as an OSGi‐based Java back end.
• Purpose: collect events, build user profiles, run personalization/A-B tests, expose REST/GraphQL APIs, plug in connectors, and persist data (default: Elasticsearch).
High-level module structure
• Core API (api/) & Common utilities (common/)
• Core services implementing business logic (services/)
• Persistence layer: SPI (persistence-spi/) + Elasticsearch implementation (persistence-elasticsearch/)
• HTTP interfaces: REST endpoints (rest/) + GraphQL endpoints (graphql/cxs-impl + graphql/graphql-ui)
• Plugin mechanism: OSGi bundles for built-in plugins (plugins/*) and extensions (extensions/*)
• Command-line tools & shell commands (tools/shell-commands, tools/shell-dev-commands, lifecycle-watcher/)
• Packaging/Deployment: Karaf features (kar/, graphql/karaf-feature), Docker (docker/), assembly (package/), build scripts
README insights
• Implements OASIS Context Server spec
• Serves personalization and A/B tests
• Default persistence: Elasticsearch
• Many independently deployable bundles loaded into an OSGi container (Apache Karaf)
Essential details
• Modular build modules as deployable bundles in one container
• Switching point between pluggable SPI and concrete implementation
• Extension discovery & Blueprint wiring
• External service endpoints and data flows