Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

impress

Package Overview
Dependencies
Maintainers
0
Versions
719
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

impress

Enterprise application server for Node.js

  • 3.0.16
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
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

  • See project template: metarhia/Example
  • Start server with node server.js
  • See documentation and specifications

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 v8-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

Package last updated on 01 Sep 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc