Hermes benefits from the speed of Apache Lucene and LMDB, and from fundamental design decisions including read-only operation and memory-mapped data files. It provides a HTTP server using the Jetty web server.
Measured against the SNOMED CT International Edition on a MacBook Pro M1 (2021), JVM 17, running from source.
Measured with criterium.
| Operation | Mean | Notes |
|---|---|---|
| Concept lookup | 0.82 us | hermes/concept by SCTID |
| Bulk lookup (15 concepts) | 14.6 us | Sequential hermes/concept x 15 |
| Free-text search | 141-184 us | hermes/search, 10 results |
| All children | 230-243 us | hermes/all-children, ~121-125 descendants |
| All parents | 19-69 us | hermes/all-parents, 10-32 ancestors |
| Subsumption test | 13-69 us | hermes/subsumed-by? |
Measured with wrk.
| Operation | Mean latency | Throughput |
|---|---|---|
| Concept lookup | 59 us | 15,546 req/s |
| Extended concept | 364 us | 2,663 req/s |
| Concept descriptions | 81 us | 11,891 req/s |
| Free-text search (10 results) | 292-378 us | 2,642-3,312 req/s |
| Subsumption test | 81 us | 11,801 req/s |
| Operation | Connections | Throughput | p50 latency |
|---|---|---|---|
| Free-text search ("heart attack") | 50 | 27,392 req/s | 0.93 ms |
| Concept lookup | 50 | 86,167 req/s | 311 us |
| Free-text search ("mnd") | 300 | 33,848 req/s | 9.74 ms |
You can reproduce these results with wrk:
# Start the server
hermes --db snomed.db serve
# Search under load
wrk -c300 -t12 -d30s --latency 'http://localhost:8080/v1/snomed/search?s=mnd'
# Concept lookup under load
wrk -c50 -t4 -d10s --latency 'http://localhost:8080/v1/snomed/concepts/24700007'
# Subsumption under load
wrk -c50 -t4 -d10s --latency 'http://localhost:8080/v1/snomed/concepts/24700007/subsumed-by/6118003'
mmap. Concept lookups are pointer dereferences, not queries — no SQL
parsing, no network round-trips to a database server.Given its design, hermes scales easily:
In real deployments, a single instance has been sufficient for hundreds of concurrent users.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |