• Stars
    star
    1,340
  • Rank 35,068 (Top 0.7 %)
  • Language
    Erlang
  • License
    Other
  • Created over 11 years ago
  • Updated 3 months ago

Reviews

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

Repository Details

โญ• N2O: Distributed WebSocket Application Server ISO 20922

N2O: TCP MQTT WebSocket

Actions Status Build Status Hex pm

N2O is an embeddable message protocol loop library for WebSocket, HTTP, MQTT and TCP servers. It provides basic features, such as process management, virtual nodes ring for request processing, sessions, frame encoding, and unified API for external mq and caching services.

Core Features

  • Purpose: High performance protocol relay
  • Endpoints: WebSockets, MQTT, TCP
  • Codebase: 700 LOC (Erlang), 500 LOC (JavaScript)
  • Dialyzer: REBAR, REBAR3, MAD, MIX
  • Hosts: COWBOY, EMQ, MOCHIWEB, RING, TCP, UDP
  • PubSub: GPROC, SYN, PG2
  • Formatters: JSON, BERT, ASN.1

Protocol Extensions

  • Templates: DTL, NITRO
  • Abstract Database Layer KVS: FS, MNESIA, ROCKSDB, RIAK, REDIS
  • Business Processes: BPE (BPMN 2.0), SCM, ERP, CRM
  • HTTP API: REST (proplist/JSON)
  • ACTIVE Reloading: GNU/Linux, Windows, macOS

Basic Samples

Enterprise Samples

  • Online Client Bank: BANK (8041)
  • Instant Messaging: CHAT (8042)
  • Product Lifecycle Management: PLM (8043)

Motivation

N2O was created to bring clarity and sanity to software development. The distribution model is per file basis with ISC license.

Kernel

The core modules provide OTP start and N2O entry point.

  • n2o โ€” N2O OTP Supervisor and Application
  • n2o_pi โ€” N2O Processes
  • n2o_proto โ€” N2O Loop
  • n2o_ring โ€” N2O Ring

MQTT

MQTT version is implemented as RPC over MQ pattern. N2O service worker started as ring of virtual nodes each runs N2O loop.

mad app zero review
cd review
mad dep com pla rep
open http://127.0.0.1:8000

WebSocket

N2O Loop is directly connected and ran inside context of WebSocket handler. Usually in Erlang we use syn or gproc OTP message buses. As such buses are optional in MQTT setup we include bus drivers in WebSocket package.

mad app nitro sample
cd sample
mad dep com pla rep
open https://127.0.0.1:8001/app/index.htm

Protocols

N2O ships with 3 optional protocols.

  • n2o_ftp โ€” N2O File protocol
  • n2o_heart โ€” N2O Heart protocol
  • nitro_n2o โ€” Nitrogen Web Framework protocol
  • bpe_n2o โ€” Business Process Engine protocol

Services

Formatters, Sessions, etc. Optional.

JavaScript

Literature

  • "N2O: no bullshit sane framework for wild web" PDF (versions 0.11โ€”4.4)
  • "N2O BOOK Vol.2 Green Book" HTML (versions 4.5โ€”9.11)

More Repositories

1

bpe

๐Ÿ’  BPE: BPMN Process Engine ISO 19510
Erlang
265
star
2

shen

๐Ÿ‰ SHEN: Erlang JavaScript Compiler
Erlang
234
star
3

kvs

๐Ÿ’ฟ KVS: NVMe Key-Value Store
Erlang
177
star
4

mad

โšก MAD: Managing Application Dependencies LING/UNIX
Erlang
173
star
5

rest

โ˜• REST: RFC-2616 Framework
Erlang
83
star
6

cr

๐Ÿ’  CR: Chain Replication Database for KVS
Erlang
57
star
7

ldap

๐ŸŒ LDAP: Directory Server. ITU/IETF: 2849, 3296, 3671-3673, 3866, 4510-4518, 4522, 4525, 4526, 4929, 5480, X.519.
Erlang
53
star
8

nitro

๐Ÿ”ฅ NITRO: Nitrogen Web Framework RFC 6455
Erlang
53
star
9

form

๐Ÿงพ FORM: Business X-Forms
Erlang
39
star
10

exe

๐Ÿ–ฅ๏ธ EXE: Shell Exec
Erlang
37
star
11

mail

โœ‰๏ธ MAIL: Message Handling Service. ISO/IEC: 10021; ITU/IETF: X.400โ€”X.403, X.407โ€”X.408, X.411โ€”X.413, X.419โ€”X.420.
Erlang
25
star
12

rpc

โ˜Ž๏ธ RPC: Type Driven Parser Generator
Erlang
18
star
13

ca

๐Ÿ›ก๏ธ CA: Certificate Authority. ะ”ะกะขะฃ: 4145. ITU/IETF: 3279, 5755, X.501, X.509, X.511, X.520.
Erlang
17
star
14

n2o.dev

๐ŸŒ N2O.DEV: Open Source Enterprise Frameworks
CSS
13
star
15

sample

๐Ÿ’ง SAMPLE: WebSocket Sample Application
Erlang
9
star
16

rt

โ˜€ RT: Erlang Runtime Library
Erlang
8
star
17

synrc.com

๐ŸŒ SYNRC: Commercial Support
HTML
7
star
18

base

โ˜€ BASE: Erlang Base Library
Elixir
6
star
19

chat

๐Ÿ’ฌ CHAT: Instant Messenger. ISO/IEC: 20922; ITU/IETF: 3394, 3565, 5280, 5480, 5652, 5755 8551, X.509, CMS, PKCS-10, PCKS-7, OCSP, LDAP, DNS; ANSI: X9-42, X9-62, X25519, X488; NIST: SECP384r1.
Erlang
6
star
20

svg

๐Ÿš€ SVG: Vector HTML5 DSL
Erlang
5
star
21

review

๐Ÿ’ง REVIEW: MQTT Sample Application
Erlang
5
star
22

ns

๐Ÿ”’ NS: Name Server IETF 1034, 1035, 1101, 2065, 2535, 2539, 4033-4035 4398, 6944
Erlang
5
star
23

mq

๐Ÿ“Ÿ MQ: MQTT Server ISO 20922
HTML
4
star
24

storybook

๐Ÿ“’ NITRO: Storybook
Erlang
1
star
25

k8s.n2o.dev

๐ŸŒ N2O.K8S: SYNRC Cloud Platform
1
star