Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/131/ubk
micro message broker for nodejs
https://github.com/131/ubk
broker json-stream
Last synced: about 2 months ago
JSON representation
micro message broker for nodejs
- Host: GitHub
- URL: https://github.com/131/ubk
- Owner: 131
- Created: 2015-04-05T21:05:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T00:07:03.000Z (7 months ago)
- Last Synced: 2024-10-28T15:13:48.828Z (2 months ago)
- Topics: broker, json-stream
- Language: JavaScript
- Size: 228 KB
- Stars: 5
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ubk
High performance, micro [JSON streaming](https://en.wikipedia.org/wiki/JSON_Streaming) message broker for v8.
[ubk](https://github.com/131/ubk) use ES8 async/await design (backed on [co/eventemitter-co](https://github.com/131/eventemitter-co)[![Build Status](https://github.com/131/ubk/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/131/ubk/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/131/ubk/badge.svg?branch=master)](https://coveralls.io/github/131/ubk?branch=master)
[![Version](https://img.shields.io/npm/v/ubk.svg)](https://www.npmjs.com/package/ubk)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
[![Code style](https://img.shields.io/badge/code%2fstyle-ivs-green.svg)](https://www.npmjs.com/package/eslint-plugin-ivs)# Key features
* Exupery style. (You will not make it any smaller or simplier)
* Broker support application (backend)
* pub/sub pattern
* RCP support (asynchronious procedure calls)
* Reflection API (list connected clients)## Server API
* Server implement EventEmitter API.
`.register_cmd(ns, command, callback)`
subscribe for a specific message in NS, callback is callback(client, query)`.broadcast(ns, cmd, payload)`
* send a payload message to all connected clients
* emit local event "ns:cmd"### Events
Broadcast messages are forwarded into the EventEmitter dispatcher
* "base:registered_client"
* "base:unregistered_client"### Base (internal) messages
"base:ping" , send periodicaly to all client to check for a living connection
*payload : none
"base:registered_client", broadcasted to all client on new client registration
*payload : client
"base:unregistered_client", broadcasted to all clients on client disconnection
*payload : client