⭕ N2O WS: Application Server
Clone or download
Latest commit 46b4508 Dec 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc N2O WS and N2O TT merge Nov 16, 2018
include N2O WS and N2O TT merge Nov 16, 2018
man o7 Nov 30, 2018
priv sync Nov 21, 2018
src src sync Nov 22, 2018
test N2O WS and N2O TT merge Nov 16, 2018
.gitignore man links Nov 17, 2018
.travis.yml empty space Nov 16, 2018
CNAME empty space Nov 16, 2018
CONTRIBUTORS.md Update CONTRIBUTORS.md Nov 19, 2018
HISTORY.md N2O WS and N2O TT merge Nov 16, 2018
LICENSE N2O WS and N2O TT merge Nov 16, 2018
README.md n2o_session sync Nov 20, 2018
index.html index Dec 2, 2018
rebar.config empty space Nov 16, 2018

README.md

N2O: Distributed Application Server

Build Status

N2O is a 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, encoding, mq, cache and log services. It also includes poor man's bridges to server's endpoints.

Features

  • Purpose: High performance protocol relay
  • Endpoints: WebSockets, MQTT, TCP
  • Codebase: 1K LOC (Erlang), 500 LOC (JavaScript)
  • Buildtools: REBAR, MAD
  • Templates: DTL, NITRO
  • Hosts: COWBOY, EMQ, MOCHIWEB
  • Samples: REVIEW (1), SAMPLE (2)

Idea

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 mqtt 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 web sample
$ cd sample
$ mad dep com pla rep
$ open http://127.0.0.1:8001/app/index.htm

Protocols

N2O is shipped with 3 protocols, which could be omited or extended.

Services

Formatters, Loggers, Sessions, etc. Optional.

JavaScript

Literature