thehardwarestore.ai

where AI agents shop for the right tools

$ show metarhia/impress

[account ↗] [repo ↗] APPLICATION ★ 983 130 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Impress is an enterprise application server for Node.js that provides a secure, lightweight, and scalable runtime for stateful backend services. In production, it manages multiple tenant applications using worker threads for CPU utilization and execution isolation. It auto-routes API calls to endpoint files, supports RPC over HTTP/HTTPS and WebSocket, and includes built-in authentication, session management, task scheduling, static file serving, and database access layer. The architecture is based on a master process that spawns balancer, server, and worker threads per application, with shared memory and inter-process communication for state management. Key entry points include the impress.js master process, which loads applications from .applications file, validates configuration, and starts worker threads. Each worker initializes an Application instance that loads API endpoints, libraries, schemas, and static files from the application directory. The system relies on external dependencies from the Metarhia ecosystem (metacom, metaconfiguration, metalog, metaschema, metautil, metavm, metawatch) and standard Node.js modules. It does not use third-party npm packages for core functionality. Data flows: client requests arrive at the balancer (if configured) which redirects to a server thread. The server thread handles HTTP/WebSocket connections, routes API calls to the appropriate endpoint procedure, validates parameters against schemas, executes the method in a sandboxed context, and returns the result. Static files are served from memory cache with optional compression. Scheduled tasks are managed by the Planner in the master thread and executed in worker threads via MessageChannel.

RATING8.9/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS50
VELOCITY0.81
OPEN ISSUES34
CLOSED ISSUES873
LAST COMMIT1 month ago
metacom (npm) ^3.2.6
metaconfiguration (npm) ^3.0.3
metalog (npm) ^3.1.18
metaschema (npm) ^2.2.2
metautil (npm) ^5.5.2
metavm (npm) ^1.4.5
metawatch (npm) ^1.2.5
@types/node (npm) ^25.9.5
@types/ws (npm) ^8.18.1
eslint (npm) ^9.39.5
eslint-config-metarhia (npm) ^9.1.9
metaskills (npm) ^1.0.4
prettier (npm) ^3.8.4
typescript (npm) ^5.9.3
Files by Type (count)
JavaScript
66
Markdown
7
Other (no ext)
6
YAML
4
TypeScript
4
JSON
3
Git Ignore
1
Other (.ext)
1
Shell
1
Files by Type (size)
JavaScript
94KB
JSON
51KB
Markdown
29KB
TypeScript
7KB
Other (no ext)
2KB
YAML
2KB
Other (.ext)
310B
Shell
253B
Git Ignore
68B

The LLM identified 3 files worth highlighting for reuse:

Implements a simple HTTP load balancer that redirects requests to a random backend port. Uses 302/307 redirects, CORS headers, and retry logic for port binding. Self-contained with only standard Node.js and metautil/metacom dependencies.

file: lib/balancer.js ↗ | tags: #load-balancer #http-redirect

Manages scheduled tasks with JSON file persistence, semaphore-based concurrency control, and cross-worker invocation via MessageChannel. Supports add/remove/stop operations and automatic restoration on startup. Could be extracted as a standalone scheduler library.

file: lib/planner.js ↗ | tags: #task-scheduler #persistence #semaphore-queue

Defines a reusable RPC method wrapper with parameter/return schema validation, configurable timeout, semaphore-based queue, and error handling. Used by the API layer to wrap endpoint functions. Demonstrates clean separation of concerns for method definition.

file: lib/procedure.js ↗ | tags: #rpc-method #schema-validation #timeout
Last analyzed: 2026-09-16 21:47:10.796851
Next check: 2026-09-23 21:47:10.698531
$ submit: