The SNOMED Classification Service (CS) is a Spring Boot–based, stateless web application that performs OWL-based classification of SNOMED CT ontologies. It accepts RF2 delta change-sets, runs an embedded reasoner (ELK by default) and produces an RF2 delta of inferred relationship changes ready for import back into a terminology server such as Snowstorm.
CS integrates with ActiveMQ, AWS S3 / local file-system storage, Consul and Vault, while exposing a REST API documented via Swagger-UI.
flowchart TD
Client["Web UI / CI pipelines"] --> CS["Classification Service"]
CS -->|REST| Reasoner["OWL Toolkit<br/>(ELK)"]
CS -->|JMS| ActiveMQ["ActiveMQ Broker"]
CS -->|S3 SDK / FS| Storage["Release & Job Store"]
CS -->|Config| Consul["Consul"]
CS -->|Secrets| Vault["Vault"]
sequenceDiagram
participant User
participant CS as Classification Service
participant Store as Storage
participant ActiveMQ
participant Reasoner as OWL Toolkit
User->>CS: POST /classifications (multipart RF2 delta)
CS->>Store: Persist delta & metadata
CS--)ActiveMQ: Enqueue classification-job
ActiveMQ-->>CS: Async job delivery
CS->>Reasoner: Run classification (snapshot + delta)
Reasoner-->>CS: Relationship delta (results.zip)
CS->>Store: Persist results
CS-->>User: 201 Created / polling endpoint
Key points:
- Stateless – all state lives in S3 or the local file-system allowing horizontal scalability.
- Spring JMS & Async Executors power distributed job processing and notifications.
- Packaged both as a fat JAR and a Debian .deb (for
supervisord
-based deployments).
- Interactive Swagger-UI / OpenAPI 3 docs – see
SwaggerConfig.java
. - Simple Basic-Auth security enabled by default (overridable / extendable).
- Distributed Classification Pipeline
- Job producer –
ClassificationController
(REST) - Worker –
ClassificationJobManager
(JMS listener)
- Job producer –
- JMS messaging (ActiveMQ) – queue configured via
classification.jms.job.queue
; prefetch size tuned for scale. - Pluggable storage layer (local FS or S3) unified via
ResourceManager
. - Consul & Vault support for distributed configuration and secrets.
- Configurable reasoner implementation – default
ELK
, switchable via REST parameter.
src/
main/
java/org/snomed/otf/reasoner/server ← Java sources
resources/ ← configuration, logback, etc.
test/ ← unit & integration tests
Package conventions:
configuration
Spring@Configuration
classes & beansrest
Spring MVC controllers / DTOsservice
Business logic & integration codepojo
Immutable POJOs & enums used in the API
- JDK 17
- Maven 3.8+ (wrapper provided)
- ActiveMQ 5.x – an embedded broker is started by default, but an external one is recommended for multi-instance testing.
- (Optional) AWS S3, Consul & Vault if you want to mirror production setups.
Tip: A
docker-compose.yml
bundling CS + ActiveMQ is included for quick startup.
git clone https://github.com/IHTSDO/classification-service.git
cd classification-service
./mvnw clean verify
verify
runs the test-suite and producestarget/classification-service-${VERSION}.jar
.- Run
./mvnw -Pdeb package
to additionally createtarget/classification-service-${VERSION}-all.deb
.
- Copy
src/main/resources/application.properties
tosrc/main/resources/application-local.properties
(already.gitignored
). - Override at least the following properties:
spring.security.user.name=<username> spring.security.user.password=<pwd> # --- Storage Locations --- snomed.release.storage.local.path=store/releases classification.job.storage.local.path=store/classifications # --- ActiveMQ --- spring.activemq.broker-url=tcp://localhost:61616 classification.jms.job.queue=classification-jobs
- Any property can also be supplied via environment variables, e.g.
SPRING_ACTIVEMQ_BROKER_URL
.
java -Xms1g -Xmx4g \
-jar target/classification-service-${VERSION}.jar \
--server.port=8089 \
--server.servlet.contextPath=/classification-service \
--spring.config.additional-location=classpath:/,file:./ \
--spring.profiles.active=local
Swagger UI will be available at http://localhost:8089/classification-service/swagger-ui/index.html.
- Classification jobs are published to
${classification.jms.job.queue}
. - Prefetch size can be tuned via
spring.activemq.queuePrefetch
(default1
for fair distribution). - Consumers must be idempotent – messages may be redelivered when using ActiveMQ in fail-over mode.
java -Xms1g -Xmx4g \
-Dspring.profiles.active=prod \
-jar classification-service-${VERSION}.jar
./mvnw -Pdeb package
- Copy the resulting
.deb
to your server. -
The application is installed under
sudo dpkg -i classification-service-${VERSION}-all.deb sudo systemctl restart supervisor # if applicable
/opt/classification-service/
and logs to/var/log/classification-service/
.
© SNOMED International – Apache 2.0 License.