• Stars
    star
    1,335
  • Rank 33,828 (Top 0.7 %)
  • Language
    Erlang
  • License
    Other
  • Created about 11 years ago
  • Updated 5 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.

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
259
star
2

shen

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

kvs

πŸ’Ώ KVS: NVMe Key-Value Store
Erlang
174
star
4

mad

⚑ MAD: Managing Application Dependencies LING/UNIX
Erlang
172
star
5

rest

β˜• REST: RFC-2616 Framework
Erlang
82
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
36
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
23
star
12

rpc

☎️ RPC: Type Driven Parser Generator
Erlang
17
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
12
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