Skip to content
N2O: Distributed Application Server — https://ws.n2o.dev
Erlang JavaScript HTML Elixir Shell
Branch: master
Clone or download

Latest commit

Latest commit 3d17c35 Jun 8, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github github actions Oct 27, 2019
img favicon && mad man groff = says ok Aug 28, 2019
include Split .hrl Jun 3, 2020
lib fix depickle Feb 3, 2020
man Fix url Feb 28, 2020
priv update n2o.js Apr 24, 2020
src 7.6.2 Jun 8, 2020
test N2O WS and N2O TT merge Nov 16, 2018
.gitignore use N2O, with: [:n2o, :nitro] Jun 10, 2019
.travis.yml enable dialyzer on travis Oct 31, 2019
CNAME Update CNAME Nov 6, 2019
COC.md Update COC.md Jun 14, 2019
CONTRIBUTORS.md Update CONTRIBUTORS.md Nov 19, 2018
HISTORY.md Update HISTORY.md Jun 6, 2019
LICENSE Update LICENSE Apr 6, 2019
README.md Update README.md May 10, 2020
index.html Merge branch 'master' of github.com:synrc/n2o May 10, 2020
mix.exs 7.6.2 Jun 8, 2020
rebar.config empty space Nov 16, 2018
sys.config syn 2.0 expected Dec 3, 2019

README.md

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, session, frame encoding, 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

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: Linux, Windows, Mac

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 runned 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.

Services

Formatters, Sessions, etc. Optional.

JavaScript

Literature

  • N2O Book PDF (outdated)
You can’t perform that action at this time.