{"id":13507363,"url":"https://github.com/synrc/n2o","last_synced_at":"2025-05-14T12:10:03.660Z","repository":{"id":7737598,"uuid":"9104262","full_name":"synrc/n2o","owner":"synrc","description":"⭕ N2O: Distributed WebSocket Application Server ISO 20922","archived":false,"fork":false,"pushed_at":"2025-02-09T23:04:37.000Z","size":7504,"stargazers_count":1342,"open_issues_count":1,"forks_count":168,"subscribers_count":80,"default_branch":"master","last_synced_at":"2025-05-07T03:23:08.757Z","etag":null,"topics":["bert","mqtt","tcp","udp","websockets"],"latest_commit_sha":null,"homepage":"https://ws.n2o.dev","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synrc.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-03-29T18:34:40.000Z","updated_at":"2025-05-01T09:41:48.000Z","dependencies_parsed_at":"2023-12-08T18:42:24.128Z","dependency_job_id":"64623537-5ce0-4fba-b738-46789c361a79","html_url":"https://github.com/synrc/n2o","commit_stats":{"total_commits":1964,"total_committers":82,"mean_commits":"23.951219512195124","dds":"0.25101832993890016","last_synced_commit":"6e37d8b26d4cf1621f2d032864f5576d0dbab11c"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synrc%2Fn2o","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synrc%2Fn2o/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synrc%2Fn2o/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synrc%2Fn2o/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synrc","download_url":"https://codeload.github.com/synrc/n2o/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253025361,"owners_count":21842413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert","mqtt","tcp","udp","websockets"],"created_at":"2024-08-01T02:00:32.223Z","updated_at":"2025-05-14T12:09:58.650Z","avatar_url":"https://github.com/synrc.png","language":"Erlang","funding_links":[],"categories":["Applications","Erlang","Frameworks","others","Tools per Language","Web Frameworks"],"sub_categories":["Erlang"],"readme":"# N2O: TCP MQTT WebSocket\n\n[![Actions Status](https://github.com/synrc/n2o/workflows/mix/badge.svg)](https://github.com/synrc/n2o/actions)\n[![Hex pm](http://img.shields.io/hexpm/v/n2o.svg?style=flat)](https://hex.pm/packages/n2o)\n\nN2O is an embeddable message protocol loop library for WebSocket, HTTP, MQTT\nand TCP servers. It provides basic features, such as process management,\nvirtual nodes ring for request processing, sessions, frame encoding, and\nunified API for external mq and caching services.\n\n## Core Features\n\n* Purpose: High performance protocol relay\n* Endpoints: WebSockets, MQTT, TCP\n* Codebase: 700 LOC (Erlang), 500 LOC (JavaScript)\n* Dialyzer: REBAR, REBAR3, MAD, MIX\n* Hosts: BANDIT, COWBOY, EMQ, MOCHIWEB, RING, TCP, UDP\n* PubSub: GPROC, SYN, PG2\n* Formatters: JSON, BERT, ASN.1\n\n## Protocol Extensions\n\n* Templates: DTL, [NITRO](https://nitro.n2o.dev)\n* Abstract Database Layer [KVS](https://kvs.n2o.dev\"): FS, MNESIA, ROCKSDB, RIAK, REDIS\n* Business Processes: [BPE](https://bpe.n2o.dev) (BPMN 2.0), SCM, ERP, CRM\n* HTTP API: [REST](https://rest.n2o.dev) (proplist/JSON)\n* [ACTIVE](https://active.n2o.dev) Reloading: GNU/Linux, Windows, macOS\n\n## Basic Samples\n\n* MQTT Chat: [REVIEW TT](https://review.n2o.dev) (8000)\n* WebSocket Chat: [SAMPLE WS](https://sample.n2o.dev) (8001)\n\n## Enterprise Samples\n\n* Online Client Bank: [BANK](https://fin.erp.uno) (8041)\n* Instant Messaging: [CHAT](https://chat.n2o.dev) (8042)\n* Product Lifecycle Management: [PLM](https://plm.erp.uno) (8043)\n\n## Motivation\n\nN2O was created to bring clarity and sanity to software development.\nThe distribution model is per file basis with ISC license.\n\n## Kernel\n\nThe core modules provide OTP start and N2O entry point.\n\n* [n2o](https://ws.n2o.dev/man/n2o.htm) — N2O OTP Supervisor and Application\n* [n2o_pi](https://ws.n2o.dev/man/n2o_pi.htm) — N2O Processes\n* [n2o_proto](https://ws.n2o.dev/man/n2o_proto.htm) — N2O Loop\n* [n2o_ring](https://ws.n2o.dev/man/n2o_ring.htm) — N2O Ring\n\n## WebSocket\n\nN2O Loop is directly connected and ran inside context of WebSocket handler.\nUsually in Erlang we use `syn` or `gproc` OTP message buses.\nAs such buses are optional in MQTT setup we include bus drivers in WebSocket package.\n\n* [n2o_ws](https://ws.n2o.dev/man/n2o_ws.htm) — N2O WebSocket Virtual Node\n* [n2o_heart](https://ws.n2o.dev/man/n2o_heart.htm) — PING protocol\n* [n2o_cowboy](https://ws.n2o.dev/man/n2o_cowboy.htm) — COWBOY API\n* [n2o_gproc](https://ws.n2o.dev/man/n2o_gproc.htm) — GPROC bus backend\n* [n2o_syn](https://ws.n2o.dev/man/n2o_syn.htm) — SYN bus backend\n\n```sh\ngit clone git@github.com:synrc/sample \u0026\u0026 cd sample\nrebar3 shell\nopen open http://localhost:8001/app/login.htm\n```\n\n## Protocols\n\nN2O ships with 3 optional protocols.\n\n* [n2o_ftp](https://ws.n2o.dev/man/n2o_ftp.htm) — N2O File protocol\n* [n2o_heart](https://ws.n2o.dev/man/n2o_heart.htm) — N2O Heart protocol\n* [nitro_n2o](https://nitro.n2o.dev/man/nitro_n2o.htm) — Nitrogen Web Framework protocol\n* [bpe_n2o](https://bpe.n2o.dev) — Business Process Engine protocol\n\n## Services\n\nFormatters, Sessions, etc. Optional.\n\n* [n2o_bert](https://ws.n2o.dev/man/n2o_bert.htm) — BERT encoder/decoder\n* [n2o_json](https://ws.n2o.dev/man/n2o_json.htm) — JSON encoder/decoder\n* [n2o_secret](https://ws.n2o.dev/man/n2o_secret.htm)  — AES/GCM-256 encoder/decoder\n* [n2o_session](https://ws.n2o.dev/man/n2o_session.htm) — ETS session storage\n\n## JavaScript\n\n* [bert.js](https://ws.n2o.dev/man/bert.js.htm) — BERT encoder/decoder\n* [utf8.js](https://ws.n2o.dev/man/utf8.js.htm) — UTF8 encoder/decoder\n* [ieee754.js](https://ws.n2o.dev/man/ieee754.js.htm) — IEEE754 encoder/decoder\n* [heart.js](https://ws.n2o.dev/man/heart.js.htm) — HEART protocol\n* [ftp.js](https://ws.n2o.dev/man/ftp.js.htm)  — FTP protocol\n* [n2o.js](https://ws.n2o.dev/man/n2o.js.htm) — N2O protocol loop\n* [mq.js](https://ws.n2o.dev/man/mq.js.htm) — MQTT client\n\n## Literature\n\n* \"N2O: no bullshit sane framework for wild web\" [PDF](https://n2o.dev/books/n2o.pdf) (versions 0.11—4.4)\n* \"N2O BOOK Vol.2 Green Book\" [HTML](https://n2o.dev/ua/books/vol.2/index.html) (versions 4.5—9.11)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynrc%2Fn2o","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynrc%2Fn2o","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynrc%2Fn2o/lists"}