Socket
Socket
Sign inDemoInstall

impress

Package Overview
Dependencies
12
Maintainers
4
Versions
718
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    impress

Enterprise application server for Node.js


Version published
Weekly downloads
966
increased by1138.46%
Maintainers
4
Created
Weekly downloads
 

Changelog

Source

[3.0.14][] - 2024-02-12

  • Fixed API endpoints local queue settings applying
  • Worker task execution global timeout implementation
  • Reimplement global timeouts.request usage during a Procedure invocation
  • Fix worker exit error: catch and restart (e.g. memoy leaks)
  • Refactor procedure timeout
  • Rewrite invoke without ports, including timeouts and thread pool
  • Fix timers namespace: due to changes in node:timers/promises

Readme

Source

impress logo ci Status snyk npm downloads/month npm downloads license

Enterprise application server for Node.js: secure, lightweight, interactive, and scalable.

Description

First Node.js server scaled with multithreading and extra thin workload isolation. Optimized for high-intensive data exchange, rapid development, and clean architecture. Provides everything you need out of the box for reliable and efficient backend, network communication with web and mobile clients, protocol-agnostic API, run-time type validation, real-time and in-memory data processing, and reliable stateful services.

Weak sides: not a good choice for content publishing including blogs and online stores, server-side rendering, serving static content and stateless services.

Strong sides: security and architecture for enterprise-level applications, long-lived connections over websocket to minimize overhead for cryptographic handshake, no third-party dependencies.

Quick start

API endpoint example: application/api/example.1/citiesByCountry.js

async ({ countryId }) => {
  const fields = ['cityId', 'name'];
  const where = { countryId };
  const data = await db.select('City', fields, where);
  return { result: 'success', data };
};

You can call it from client-side:

const res = await metacom.api.example.citiesByCountry({ countryId: 3 });

Metarhia and impress application server way

  • Applied code needs to be simple and secure, so we use sandboxing with v8 isolated contexts, worker threads and javascript closures;
  • Domain code should be separated from system code; so we use DDD, layered (onion) architecture, DI, SOLID and GRASP principles, contract-based approach;
  • Impress supports stateful applications with RPC and client-session sticky to servers; microservices, centralized or distributed architecture;
  • No I/O is faster even than async I/O, so we hold state in memory, share it among multiple threads and use lazy I/O for persistent storage;
  • We use just internal trusted dependencies, no third-party npm packages; total Metarhia technology stack size is less than 2mb.

Features

  • 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

Requirements

  • Node.js v18.x or v20.x
  • Linux (tested on Fedora v36-38, Ubuntu v18-23, CentOS v7-9)
  • Postgresql v11-16
  • OpenSSL v3 or later (optional, for https & wss)
  • certbot (recommended but optional)

License & Contributors

Copyright (c) 2012-2024 Metarhia contributors. See github for full contributors list. Impress Application Server is MIT licensed. Project coordinator: <timur.shemsedinov@gmail.com>

Keywords

FAQs

Last updated on 12 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc