benoitc/hornbeam
66.0
Adequate · 2 October 2026
14.7k
lines of production code
Erlang
with Python, JavaScript
2
measurements over time
What this system is
Hornbeam is an Erlang-based application server that hosts and manages Python applications via WSGI and ASGI interfaces. It provides infrastructure for real-time communication through WebSocket channels and distributed presence, alongside capabilities for distributed RPC and ML caching using Erlang ETS. The system also includes a JavaScript client for client-side channel management and a benchmark suite for performance evaluation.
Features
Add benchmark suite for Hornbeam WSGI/ASGI performance
The benchmarks directory now includes a comprehensive suite of scripts and sample applications to evaluate Hornbeam's performance. This includes Python benchmark runners (run\_benchmark.py, compare\_servers.py, compare\_asgi\_servers.py) and shell scripts (quick\_bench.sh, bench\_pooled\_comparison.sh, bench\_wsgi\_vs\_asgi.sh) that measure throughput and latency using tools like Apache Bench and wrk. The suite supports comparing Hornbeam against Gunicorn, as well as comparing Hornbeam's WSGI, ASGI, and pooled worker modes against each other and against other ASGI servers like Uvicorn, Granian, and Gunicorn.
benchmarks · high confidence
Add embedding\_chat example application
Introduces a new Erlang OTP application example that demonstrates integrating Python-based sentence-transformers with an Erlang backend. The app initializes a Python environment to load an embedding model (defaulting to all-MiniLM-L6-v2) and exposes HTTP endpoints for embedding and similarity calculations via a FastAPI ASGI server. It also includes a pure Erlang WebSocket handler for real-time echo functionality, serving as a reference for Erlang-Python binding and Hornbeam integration.
_examples/embedding\chat · high confidence
Added Docker build smoke test script
A new shell script, scripts/docker\_smoke.sh, has been added to automatically verify that all Dockerfiles in the repository build successfully. This tool helps catch issues like stale COPY paths, broken apt packages, or missing build steps before they reach production. It runs a fast set of builds by default and can include heavier ML-related builds via the DOCKER\_SMOKE\_HEAVY flag.
scripts · high confidence
Introduce ASGI, Channels, and Erlang integration modules
Added new Python modules in the priv directory to support ASGI protocol handling, real-time channels, and Erlang integration. The hornbeam\_asgi\_worker.py module implements ASGI request handling with optimized body reception and response batching. The hornbeam\_channels.py and hornbeam\_channels\_runner.py modules provide a decorator-based API for building real-time channel handlers with support for joins, leaves, and events. The hornbeam\_erlang.py module exposes Python access to Erlang features including hook registration, shared state via ETS, distributed calls, and pub/sub messaging. Additional modules include hornbeam\_hooks\_runner.py for dirty execution of Python app actions, hornbeam\_lifespan\_runner.py for ASGI lifespan protocol handling, hornbeam\_ml.py for ETS-backed ML caching, hornbeam\_presence.py for distributed presence tracking using ORSWOT CRDT, hornbeam\_websocket\_runner.py for WebSocket protocol communication, and hornbeam\_wsgi\_worker.py for WSGI request handling with zero-copy body streaming.
priv · high confidence
Introduce Hornbeam JavaScript client with channels and presence
The JavaScript client now supports real-time multiplexed communication via WebSocket channels and distributed presence tracking. Users can create channels to join topics, push events, and handle responses, while the Presence API allows tracking of user joins and leaves across connected clients. The library is built using esbuild to produce ESM, CommonJS, and UMD bundles, and includes TypeScript definitions for type safety.
js · high confidence
Introduce core Erlang infrastructure for Python app integration
This change adds the foundational Erlang modules that enable Hornbeam to host and manage Python applications. It introduces a callback registry (hornbeam\_callbacks) for Python apps to invoke Erlang functions, a channel system (hornbeam\_channel, hornbeam\_channel\_registry) for WebSocket pub/sub and presence, and a context pool (hornbeam\_context\_pool) for efficient Python interpreter management. Additionally, it provides distributed RPC capabilities (hornbeam\_dist) for cross-node calls, a hooks framework (hornbeam\_hooks, hornbeam\_http\_hooks) for request lifecycle and custom actions, and an ASGI lifespan manager (hornbeam\_lifespan) for startup/shutdown handling. The HTTP listener is now managed via the livery service (hornbeam\_listener).
src · high confidence
Launch of the Hornbeam documentation website
The project now includes a dedicated documentation website built with Astro, Tailwind CSS, and MDX. This site provides a structured hub for users, featuring a responsive layout with automatic light/dark theme support, a sidebar navigation that organizes content into Getting Started, Guides, Examples, and Reference sections, and a product switcher to toggle between Hornbeam and Erlang Python documentation. It also includes a contact page with links to GitHub, issue trackers, and direct email, along with a homepage that showcases the architecture and live code demos for ML caching, distributed RPC, and real-time channels.
website · high confidence
New demo examples for real-time chat, distributed RPC, and multi-app mounting
Added new example applications in the \examples\ directory to demonstrate key Hornbeam capabilities. The \channels\_chat\ example provides a Phoenix-style real-time chat application using WebSocket channels and presence, including a Dockerfile and docker-compose setup. The \demo\ directory introduces three distinct demonstrations: an ML caching demo showing hook-based architecture with FastAPI and Erlang ETS caching, a distributed RPC demo illustrating a 3-node Erlang cluster for fan-out inference, and a multi-app demo showcasing mounting multiple Python applications (FastAPI, Flask, and static WSGI) at different URL prefixes with isolated virtual environments.
examples · high confidence
Behavioural changes
HTTP server migration to livery with HTTP/2 and HTTP/3 support
The HTTP server has moved from cowboy to livery, enabling HTTP/2 and HTTP/3 (QUIC) support alongside HTTP/1.1. Users can now configure \http\_version\ to select protocols, with HTTP/2 and HTTP/3 requiring TLS. The \routes\ option shape has changed to livery router entries, and the \hornbeam\_wsgi\ module has been removed. Additionally, request size limits (\max\_request\_line\_size\, \max\_header\_size\, \max\_headers\) are now enforced, and a HEAD response crash over HTTP/2/3 has been fixed.
(repo-wide) · high confidence
Updated server binding port and erlang\_python execution model
The server now binds to port 8642 instead of 8000, and the erlang\_python configuration has shifted from a worker-based model to a context-based model, replacing the num\_workers setting with num\_contexts (set to 4) and adding a max\_concurrent limit of 10000. Additionally, the pythonpath configuration now uses binary strings for its paths.
config · high confidence
Test coverage
Added test applications and doc-snippet fixtures for WSGI/ASGI validation; Expanded test coverage for channels, distributed RPC, and lifecycle teardown.
Dependencies
Add dependency manifests for benchmarks, demos, and website
This change introduces requirements and package manifests for several new areas of the project. For Python benchmarks, it adds gunicorn, uvicorn, granian, and uvloop. It also adds dependency files for demo applications, including distributed RPC and ML caching (using FastAPI and Pydantic), a multi-app demo (using Flask and FastAPI), and a realtime chat demo. Additionally, it adds a JavaScript client package (hornbeam-js) with esbuild as a dev dependency, and sets up the website using Astro, Tailwind CSS, and Shiki.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 65 → 66 (+0.9)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 93 → 95 (+1.4)
- Architecture 100 → 100 (+0.1)
- Maturity 65 → 69 (+3.8)
- Readiness 59 → 59 (+0.3)
- Security 67 → 72 (+4.7)
- Accessibility 73 → 73 (+0.0)
- Performance 70 (new)
Resolved (16)
- Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
- Documentation: no installation or build instructions (README.md)
- Documentation: no installation or build instructions (docs/examples/distributed-ml.md)
- Documentation: no installation or build instructions (docs/examples/embedding-service.md)
- Documentation: no usage examples (README.md)
- Documentation: no usage examples (docs/examples/embedding-service.md)
- Documentation: written for insiders (docs/guides/custom-apps.md)
- Duplicated block (11 lines × 3) (priv/hornbeam_asgi_runner.py)
- Duplicated block (12 lines × 2) (priv/hornbeam_wsgi_runner.py)
- Duplicated block (22–30 lines × 2) (priv/hornbeam_asgi_runner.py)
- Duplicated block (50 lines × 2) (priv/hornbeam_wsgi_runner.py)
- Edited copy of a member (53 corresponding lines) (priv/hornbeam_wsgi_runner.py)
- Hotspot: priv/hornbeam_asgi_runner.py (priv/hornbeam_asgi_runner.py)
- hornbeam_asgi_runner._run_coro_fast (cognitive 72) (priv/hornbeam_asgi_runner.py)
- hornbeam_asgi_runner._run_coro_fast (cyclomatic 21) (priv/hornbeam_asgi_runner.py)
- hornbeam_asgi_runner.run_asgi (cognitive 20) (priv/hornbeam_asgi_runner.py)
New (19)
- Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
- Duplicated block (11 lines × 2) (examples/embedding_chat/src/embedding_chat_app.erl)
- Duplicated block (11 lines × 2) (priv/hornbeam_lifespan_runner.py)
- Duplicated block (13 lines × 2) (src/hornbeam_hooks.erl)
- Duplicated block (24 lines × 2) (examples/hooks_demo.erl)
- Duplicated block (6 lines × 2) (src/hornbeam_presence.erl)
- Duplicated block (7 lines × 2) (examples/embedding_chat/src/embedding_chat_app.erl)
- Duplicated block (7 lines × 2) (src/hornbeam_presence.erl)
- Duplicated block (8 lines × 2) (src/hornbeam_tasks.erl)
- Duplicated block (9 lines × 2) (src/hornbeam_lifespan.erl)
- Floating source dependency: erlang_python
- Floating source dependency: erlang_python
- Floating source dependency: hornbeam
- Floating source dependency: hornbeam
- Floating source dependency: hornbeam
- No dependency lockfile committed (examples/demo/ml_caching/rebar.config)
- No dependency lockfile committed (examples/demo/multi_app/rebar.config)
- No dependency lockfile committed (examples/embedding_chat/rebar.config)
- No dependency lockfile committed (rebar.config)
Changes since last survey
- 2 commits — 1 feature/other, 1 fixes
By area
- docs/guides — 1 commit
- examples/demo — 1 commit
Notable commits
- fix: Fix lifecycle teardown, config drift and unbounded atom creation (#20)
- change: Move HTTP from cowboy to livery, and serve HTTP/2 and HTTP/3 (#17)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
benoitc/hornbeam was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 19f89932fbbd61c1863a7463fdf0bd092e655c11 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.