The Apache Unomi team is pleased to announce Apache Unomi 4.0.0. Apache Unomi is an open source customer data platform. It is a Java server that collects profiles, events, and segments for visitors, leads, and customers, and uses rules and conditions to personalize their experience. It is the reference implementation of the OASIS Customer Data Platform specification.
Unomi 4.0 keeps the Unomi 3 runtime. The release is large because of new server code. From 3.1.0 to 4.0.0 the source tree gained about 190,000 lines. Most of that sits in four places. Multi-tenancy Tenancy is the widest change in the product code. Tenants and API keys are stored items. Public calls use a tenant API key. Administrative calls use a private key or system administrator credentials. The profile, event, rule, segment, definition, and goal services now run inside a tenant, and GraphQL gained tenant and security directives. Unomi 2 and Unomi 3 clients can keep calling the server in single-tenant compatibility mode. Task scheduler The scheduler is the largest new runtime subsystem. A task is either persisted for the cluster or kept on one node. It moves through scheduled, waiting, running, completed, failed, cancelled, and crashed. Cluster locks stop two nodes from running the same task, and a failed node is recovered. Plugins register a task type and an executor. Operators list, cancel, retry, and resume tasks over REST (/cxs/tasks) and the Karaf shell. Unit tests, on an in-memory PersistenceService This is the largest new body of code. Unomi 4.0 adds an in-memory PersistenceService that exists only on the test classpath. It implements the same interface as the Elasticsearch and OpenSearch backends: items, queries, conditions, aggregates, scrolling, and sequences. Profile, event, rule, segment, definition, and tenant services can be tested without starting Karaf or a search cluster. The implementation is a few thousand lines. The unit tests written against it are the bulk of the addition. The integration tests, which still boot the real stack, grew sharply as well. OpenSearch OpenSearch is a second PersistenceService, beside Elasticsearch. The module is new in this release: the client, the query builders, and the index mappings. The same Unomi features run on either engine. The manual describes a migration from Elasticsearch to OpenSearch. Also in this release - Karaf shell commands to create, read, update, and delete profiles, events, segments, rules, tenants, and API keys, and migration scripts that move a 3.x server onto tenant document ids. - Segments, rules, and queries are checked against their condition types when they are saved. - The condition and query layer shared by Elasticsearch, OpenSearch, and the in-memory test service. - Request tracing for context and event-collector calls (explain=true). - The web tracker shipped with the server is 2.0.0. It can send the tenant API key. Manual The manual now documents the features above, including multi-tenancy, the scheduler, and the move from Elasticsearch to OpenSearch. The conditions documentation is new: a guide with examples, from a profile property check through boolean conditions and past events, plus the catalog of built-in condition types. The quick start and shell commands were corrected so they match the server that shipped. Use the latest manual for those corrections. Website https://unomi.apache.org/ has been rebuilt for this release, including Getting Started and the download page. The site now has a blog. The first posts walk through multi-tenancy, the scheduler, OpenSearch, migration, and the new tests. https://unomi.apache.org/blog/ Upgrading from 3.x is a migration. The manual covers the 3.0 to 4.0 steps and single-tenant compatibility mode. What's new: https://unomi.apache.org/manual/4_0_x/index.html#_whats_new_4_0 Thanks to everyone who contributed to this release. The Apache Unomi Team
