synrc/n2o
关于
⭕ N2O:分布式 WebSocket 应用服务器 ISO 20922
网站与应用开发可以做什么
- Purpose: High performance protocol relay
- Endpoints: WebSockets, MQTT, TCP
- Codebase: 700 LOC (Erlang), 500 LOC (JavaScript)
- Dialyzer: REBAR, REBAR3, MAD, MIX
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- -1
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文N2O: TCP MQTT WebSocket
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: BANDIT, 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
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.
- n2o_ws — N2O WebSocket Virtual Node
- n2o_heart — PING protocol
- n2o_cowboy — COWBOY API
- n2o_gproc — GPROC bus backend
- n2o_syn — SYN bus backend
git clone [email protected]:synrc/sample && cd sample
rebar3 shell
open http://localhost:8001/app/login.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.
- n2o_bert — BERT encoder/decoder
- n2o_json — JSON encoder/decoder
- n2o_secret — AES/GCM-256 encoder/decoder
- n2o_session — ETS session storage
JavaScript
- bert.js — BERT encoder/decoder
- utf8.js — UTF8 encoder/decoder
- ieee754.js — IEEE754 encoder/decoder
- heart.js — HEART protocol
- ftp.js — FTP protocol
- n2o.js — N2O protocol loop
- mq.js — MQTT client
Literature
探索相关项目
加载中…