# ubk_v2

> micro message broker

Latest version **1.2.1** (published 2016-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install ubk_v2
pnpm add ubk_v2
yarn add ubk_v2
bun add ubk_v2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2016-01-06 |
| First published | 2016-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+5 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Francois Leurent |
| Maintainers | idjem |
| Keywords | message, tcp, ws |

## Links

- npm: https://www.npmjs.com/package/ubk_v2
- Repository: https://github.com/131/ubk
- Issues: https://github.com/131/ubk/issues
- npm.io page: https://npm.io/package/ubk_v2

## Dependencies (3)

- [ws](https://npm.io/package/ws.md) ^0.8.0
- [mout](https://npm.io/package/mout.md) ^0.11.0
- [uclass](https://npm.io/package/uclass.md) ^2.0.5

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2016-01-06
- 1.2.0 — 2016-01-05

## README

# ubk
micro message broker for v8.

# 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)


# Usage example
* See minimal RPC sample here : https://github.com/131/ubk-tests


## 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

---
_Source: https://npm.io/package/ubk_v2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
