• Stars
    star
    969
  • Rank 47,227 (Top 1.0 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Enterprise application server for Node.js and Metarhia private cloud ⚡

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

  • Auto API routing, just create endpoint files as an async function;
  • Code live reload with file system watch (when files change on disk);
  • Graceful shutdown and application state recovery after reload;
  • Minimal dependencies and code size;
  • Can scale with multiple threads and servers;
  • Code sandboxing for security and context isolation;
  • Auto module loader with dependency injection for namespaces;
  • Layered architecture out of the box: core, domain, API, client;
  • Utilize multiple CPU cores and serve multiple ports with worker threads;
  • Inter-process communication and shared memory used for state management;
  • State synchronization mechanism with transactions and subscription;
  • Cache server-side executable JavaScript in memory;
  • Rapid API development support: AJAX RPC and Websocket;
  • Serve static files from memory cache;
  • Application configuration (for different named environments);
  • Database access layer for PostgreSQL and relational db schemas;
  • Persistent sessions support with authentication, groups, and anonymous;
  • Multiple protocols: HTTP, HTTPS, WS, WSS;
  • Logging with buffering (lazy write) and rotation (keep logs N days);
  • File utilities: upload, download, streaming;
  • Built-in simple testing framework;
  • Server health monitoring;
  • Built-in data structures validation and preprocessing library;
  • Task scheduling (interval or certain time);
  • Concurrency control: request queue with timeout and size;
  • Execution timeout and error handling;

Requirements

  • Node.js v16.0.0 or later (v18 preferred)
  • Linux (tested on Fedora 36, 37, Ubuntu 18, 20 and 22, CentOS 7, 8, 9)
  • Postgresql 11 or later (v14 preferred)
  • OpenSSL v3 or later (optional, for https & wss)
  • certbot (recommended but optional)

License & Contributors

Copyright (c) 2012-2023 Metarhia contributors. See github for full contributors list. Impress Application Server is MIT licensed. Project coordinator: <[email protected]>

More Repositories

1

metasync

Asynchronous Programming Library for JavaScript & Node.js
JavaScript
205
star
2

Example

Metarhia application example for Node.js 🟢
JavaScript
198
star
3

jstp

Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
JavaScript
142
star
4

noroutine

Goroutine analogue for Node.js, spreads I/O-bound routine calls to utilize thread pool (worker_threads) using balancer with event loop utilization. 🌱
JavaScript
120
star
5

metautil

Metarhia utilities 🧰
JavaScript
98
star
6

web-locks

Web Locks API 🔒
JavaScript
83
star
7

Docs

Metarhia docs and F.A.Q. 📒
82
star
8

metacom

RPC communication protocol for Metarhia stack 🔌
JavaScript
80
star
9

BestPractice

Metarhia best practice for relative technologies
62
star
10

common

Metarhia Common Library 🗜️
JavaScript
62
star
11

Metarhia

Technology Stack for Highload Applications ⬢
HTML
61
star
12

globalstorage

Distributed Data Warehouse 🌍
JavaScript
60
star
13

swayer

Schema based frontend framework 👀
JavaScript
52
star
14

metaschema

Schema definition and validation 💡
JavaScript
52
star
15

sandboxed-fs

Sandbox wrapper for Node.js File System API 💾
JavaScript
47
star
16

concolor

Colouring template strings using tags with annotations 🎨
JavaScript
44
star
17

do

Simplest way to manage asynchronicity
JavaScript
43
star
18

metarhia.com

Metarhia technology stack web site ⬢
JavaScript
40
star
19

metalog

Metarhia logger 📝
JavaScript
40
star
20

metasql

Metarhia SQL builder and Postgres utilities 🐘
JavaScript
40
star
21

metavm

Script loader with isolated sandboxes for node.js 📦
JavaScript
39
star
22

Contracts

Metarhia core docs and contracts specifications 📒
37
star
23

tickplate

Back-tick template engine for JavaScript 💬
JavaScript
33
star
24

arhaica

Milti-Domain Content Publishing System for Archaic Web
JavaScript
32
star
25

Manifesto

Manifesto of Metarhia Community ⬢
29
star
26

messenger

JavaScript
29
star
27

impress-cli

Impress Application Server Command line interface
JavaScript
28
star
28

console

Constructivism in UI rendering
26
star
29

JSQL

JavaScript Query Language
JavaScript
25
star
30

impress-example

Example application for Impress Application Server
JavaScript
23
star
31

eslint-config-metarhia

ESLint config for Metarhia projects
JavaScript
18
star
32

metatests

Extremely simple to use test framework and runner for Metarhia technology stack 🧪
JavaScript
18
star
33

metawatch

Nested directories watch for node.js 🕵️
JavaScript
14
star
34

metaconfiguration

Metarhia configuration loader 🔧
JavaScript
14
star
35

SummerCamp

Metarhia Summer Camp 2022
12
star
36

metastreams

Readable and Writable Streams with buffering
JavaScript
12
star
37

lowscript

Low-code script engine for Metarhia 📃
JavaScript
11
star
38

Metapay

Metarhia payment subsystem 🪙
11
star
39

sql

Metarhia SQL utilities
JavaScript
11
star
40

metadomain

Metarhia core model: database schemas 💎
JavaScript
10
star
41

metadoc

Metarhia Documentation Generator
JavaScript
10
star
42

metacalc

Spreadsheet calculations for Metarhia 🧮
JavaScript
10
star
43

Template

Metarhia app minimal template 🔵
JavaScript
9
star
44

mdsf

Metarhia Data Serialization Format
C++
9
star
45

Roadmap

Roadmap for new contributors and for technology stack 🛣️
9
star
46

Metalocal

Smart local area, township, housing, city solution 🏘️
9
star
47

jstp-swift

Swift
9
star
48

Accounts

User accounts, contacts, permissions, and authentication subsystem 👥
8
star
49

metamail

Metarhia mail subsystem ✉️
JavaScript
8
star
50

metacom-android

Metacommunicator for Android
Java
8
star
51

metacms

Metarhia CMS
JavaScript
8
star
52

iterator

Efficient and composable iteration
JavaScript
8
star
53

filestorage

JavaScript
8
star
54

protocol

Metarhia Protocol
Shell
8
star
55

tools

Metarhia development tools
JavaScript
7
star
56

Metanet

Communication, messaging, file transfer and content publishing 🔭
7
star
57

console-web

Metarhia web client
JavaScript
7
star
58

MetaTalk

Metarhia application example: chat, file storage, auth
JavaScript
7
star
59

metagram

ERD generator for metaschema
JavaScript
7
star
60

metatests-browser-runner

Browser test runner for metatests ⚙️
JavaScript
7
star
61

eslint-plugin-impress

ESLint plugin for Impress Application Server
JavaScript
6
star
62

xxii

xxii news
JavaScript
6
star
63

metacom-ios

Metacommunicator for iOS
Swift
6
star
64

jstp-java

JSTP implementation in java
Java
5
star
65

metascheduler

Metarhia task scheduler 📅
JavaScript
5
star
66

metaschema-langserver

Metaschema Language Server Protocol
5
star
67

metastorage

Metarhia file storage
JavaScript
5
star
68

metagui

GUI Components for Metarhia technology stack
JavaScript
5
star
69

remark-preset-lint-metarhia

Opinionated remark-lint preset
JavaScript
5
star
70

metacommand

Metarhia command-line interface utilities
JavaScript
5
star
71

mtypes

Common types for Metarhia 🤝
JavaScript
5
star
72

Partners

Metarhia (NodeUA and HowProgrammingWorks) Community Partners
5
star
73

namespace

High stable namespace registry of algorithms, tools, data structures, modules, components, etc.
JavaScript
5
star
74

Infrastructure

Metarhia Common Infrastructure 📦
5
star
75

ExampleWebSite

Example Web Site for metacms
JavaScript
5
star
76

metacode

Development Environment for Metarhia Stack
4
star
77

highcode

High-code is like low-code and no-code, but with higher abstraction 🧑‍💻
JavaScript
4
star
78

prettier-config

Prettier config for Metarhia projects
4
star
79

thread-balancer

Thread load balancer
3
star
80

StopList

Community Technology Stop-list
3
star
81

.github

The first technology stack for Node.js scaled with threads
1
star