Skip to content

metarhia/Docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Metarhia tech stack documentation

Metarhia is the first technology stack for Node.js scaled with threads, offering ultra-lightweight workload isolation. It is optimized for high-intensive data exchange, rapid development, clean architecture, and easily understandable domain-specific code. Metarhia provides an all-in-one solution for a reliable and efficient backend. It supports network communication with web and mobile clients, offers a protocol-agnostic API, run-time type validation, real-time and in-memory data processing, and both stateful and stateless services.

Weaknesses: not suitable as content publishing platforms, including blogs and SEO-focused websites, as well as server-side rendering and serving static content.

Strengths: enhanced security and architecture suitable for enterprise-level applications, long-lived WebSocket connections to minimize latency and handshake overhead, and no third-party dependencies.

Short feature list

  • API auto-routing calls to endpoint for rapid API development (no need to add routes manually)
  • API concurrency: request execution timeout and execution queue with both timeout and size limitations
  • Schemas for API contract, data structures validation, and domain models
  • Application server supports different API styles: RPC over AJAX and over Websocket, REST, and web hooks
  • Multiple protocols support: HTTP, HTTPS, WS, WSS
  • Auto loader with start hooks, namespace generation for code and dependencies
  • Live reload of code through filesystem watch
  • Graceful shutdown with stop hooks
  • Minimal dependencies and reduced code size
  • Layered architecture: api, domain logic, data access layer, and system code layer (hidden)
  • Code sandboxing for enhanced security and execution context isolation
  • Code protection: reference pollution prevention, prototype pollution prevention
  • Multi-threading for CPU utilization and execution isolation
  • Load balancing for simple scaling with redirection to multiple ports
  • Caching: in-memory caching for APIs and static files
  • Configuration: environment-specific application settings
  • Database access layer compatible with PostgreSQL with SQL-injection protection
  • Persistent sessions with authentication, groups, and anonymous sessions
  • Buffered logging (lazy write) with log rotation (keep logs N days) and console interface
  • Testing: integrated node.js native test runner and table-test support
  • Inter-process communication and shared memory used for state management
  • File utilities: upload, download, support for partial content and streaming
  • Task Management: scheduled task execution at specific intervals or certain times

TODO list

Those features will be implemented in nearest future (3-6 months):

  • Server health monitoring
  • Database migrations
  • State synchronization mechanism with transactions and subscription
  • Multi-tenancy support