Hysen Labs
Framework
guenchi/Igropyr avatar
guenchi

Igropyr

A distributed, fault-tolerant, high-concurrency backend framework with continuation-based web programming and a remote retry ring, built on Chez Scheme.

151 stars18 forksSchemeMIT
DEEP OPEN-SOURCE ANALYSIS

Igropyr is a backend framework for Chez Scheme with green processes and a remote retry ring

Built on Chez Scheme, Igropyr splits a small core from an optional Express style layer and leans on message passing, a supervisor pool and signed failure handling.

The core and framework split

Igropyr is a distributed, fault tolerant, high concurrency backend framework built on Chez Scheme, and it draws an explicit comparison to Node and Express by separating a core from an optional framework layer. The core exposes a single entry point, a call that listens on a port and takes a request and response lambda, while the bundled express style layer with create app, app get and send json helpers is optional. The README points out that alternative frameworks can be built on the same core, so the base stays small. Green processes are the scheduling primitive: thousands of lightweight processes run over one OS thread, and continuation based context switching with preemption means a CPU spinning handler cannot freeze the whole system. Communication is pure message passing through spawn, send, receive, link and monitor, with no shared state between processes. The project homepage is igropyr.dev and the manual is hosted there as well.

How fault tolerance is built in

Fault tolerance is the default rather than an add on. A fixed worker pool sits behind a supervisor: crashed workers are replaced and the task is retried at most three times before the client gets a 500, and any worker stuck for more than thirty seconds is killed and replaced. A slow or half sent request only ever blocks its own reader process, which keeps one bad connection from backing up the server. The failure hook, called the remote retry ring, answers with a structured JSON fault on the same keep alive connection when retries are exhausted or a stuck worker is killed, instead of a plain 500. The client can then resubmit with changed parameters or carried state and get a fresh retry round. Conversations let a multi request dialogue such as a wizard or a transfer run as one green process holding live state, even an open database transaction, across rounds, with suspend and resume tokens naming the reply being answered.

The feature surface and data clients

Beyond the core, Igropyr ships a long list of building blocks. Hot code swapping replaces a handler or individual routes on a live server while the listener, open connections and worker pool stay up and in flight requests finish on the old code. WebSocket support follows RFC 6455 on the same port, with each socket as its own green process and an optional auth guard before the handshake. Streaming responses and server sent events are built on chunked body helpers. The OTP style building blocks include a gen server, a process registry and topic pubsub with automatic cleanup of dead subscribers. There is a safe recursive descent JSON parser that avoids read, plus form and cookie parsing with file uploads. Middleware covers cookie sessions, CORS with preflight, security headers and an access logger. Authentication is a format neutral role spanning HTTP Bearer tokens and WebSocket guards, with JWT signing and verification pinned to HS256 and password hashing over libcrypto using PBKDF2, scrypt and argon2id. Non blocking Redis, MySQL and PostgreSQL clients share the same event loop, with PostgreSQL authenticating via SCRAM SHA 256 and optional TLS.

Editorial conclusion

Igropyr is published under the MIT license with 151 stars, runs on Chez Scheme, and offers its documentation and manual at igropyr.dev alongside an optional Express style layer over a minimal core.

DEEP OPEN-SOURCE ANALYSIS

Official sources

Community notes

Community notes