meshblu-server
v5.3.5
Published
A bundled version of meshblu-core
Downloads
321
Keywords
Readme
Meshblu
Meshblu is a cross-protocol IoT machine-to-machine instant messaging system. It is the core messaging system for Citrix's Octoblu IoT platform.
Supported Protocols: HTTP, Socket.io, Websocket, MQTT, CoAP, AMQP, and XMPP.
Version 2.0
We have completely re-written Meshblu into many small components or micro-services. This Meshblu 1.0 repository is being preserved for historical reference.
All of the new Meshblu components are prefixed with meshblu-core
. See a list here.
Meshblu is dependent on node.js
, redis
, mongodb
, and either npm
or yarn
.
Production
In order to run a barebones meshblu-core
cluster, you'll need the following repositories.
All meshblu-core
services and workers have a Dockerfile
.
A production Meshblu cluster will consist of many services and workers. We currently don't have documentation for running a complex cluster but we are working on it.
Development
For development use, you can run the bundled barebones cluster:
Installation
git clone https://github.com/octoblu/meshblu
cd meshblu
npm install
See Usage
node command.js --help
Basic Example w/ env
#!/bin/bash
# For development usage only
env \
PRIVATE_KEY_BASE64="..." \
PUBLIC_KEY_BASE64="..." \
PEPPER='some-random-string' \
MESHBLU_HTTP_PORT='3000' \
node command.js
See ./test-start.sh
Basic Example w/ args
#!/bin/bash
# For development usage only
node command.js \
--private-key-base64 '...' \
--public-key-base64 '...' \
--pepper 'some-other-random-string' \
--meshblu-http-port 3000
Debug Mode
It is normal not see any debug output by default. If you want to see debug output, use the environment DEBUG=*
, or something more specific, like DEBUG=meshblu*
.
It's Alive!
To verify that Meshblu 2.0 is alive and well, open http://localhost:3000/status in a web browser or open a new terminal tab and run:
curl http://localhost:3000/status
You should see Meshblu 2.0 respond with:
{"meshblu":"online"}
You can register a new IoT device by running:
curl -X POST http://localhost:3000/devices
You should see Meshblu 2.0 respond with an authentication UUID and Token as well as the device's security whitelist settings like this:
{ online: false,
discoverWhitelist: [ '*' ],
configureWhitelist: [ '*' ],
sendWhitelist: [ '*' ],
receiveWhitelist: [ '*' ],
uuid: 'b112c941-7973-4e2b-8dbe-b7bba27ae199',
meshblu:
{ createdAt: '2016-11-15T16:07:07.801Z',
hash: 'Dy5NlIlmygrrnhp0Cln+zb77nHlYdobc+HwbRVzWdPs=' },
_id: '582b32ab67899618f48c2e1b',
token: 'd5bcf1a57f4ccefa0ecdc672c7090e7949cc8244' }
Meshblu API Documentation
Checkout our developer docs for more information on our HTTP REST API as well as documentation for all other protocol APIs, security whitelists and blacklists, connectors, data forwarders, and overall Meshblu architecture.
Introducing the Meshblu CLI
We have a convenient command line interface for simplifying the interaction with the Meshblu API.
# Install the meshblu cli utility
npm install --global meshblu-util
# Register a device
meshblu-util register -U http://localhost:3000 > meshblu.json
# Fetch the device
meshblu-util get
# Update the device
meshblu-util update -d '{"type": "some-device"}'
# Fetch the updated device
meshblu-util get
List of meshblu-core
components
Workers
Protocol Adapters
- meshblu-core-protocol-adapter-socket.io
- meshblu-core-protocol-adapter-http
- meshblu-core-protocol-adapter-xmpp
- meshblu-core-protocol-adapter-coap
- meshblu-core-protocol-adapter-mqtt
- meshblu-core-protocol-adapter-http-streaming
Firehoses
Balancers
- meshblu-haproxy
- meshblu-balancer-http-streaming
- meshblu-balancer-firehose-socket.io
- meshblu-balancer-xmpp
- meshblu-balancer-websocket
- meshblu-balancer-mqtt
- meshblu-balancer-coap
- meshblu-balancer-socket.io
Core Datastores
Core Managers
- meshblu-core-manager-token
- meshblu-core-manager-device
- meshblu-core-manager-hydrant
- meshblu-core-manager-whitelist
- meshblu-core-manager-webhook
- meshblu-core-manager-subscription
- meshblu-core-manager-root-token
- meshblu-core-manager-messenger
Core Tasks
- meshblu-core-task-black-list-token
- meshblu-core-task-check-broadcast-received-whitelist
- meshblu-core-task-check-broadcast-sent-whitelist
- meshblu-core-task-check-configure-as-whitelist
- meshblu-core-task-check-configure-whitelist
- meshblu-core-task-check-discover-as-whitelist
- meshblu-core-task-check-discover-whitelist
- meshblu-core-task-check-discoveras-whitelist
- meshblu-core-task-check-forwarded-for
- meshblu-core-task-check-receive-as-whitelist
- meshblu-core-task-check-receive-whitelist
- meshblu-core-task-check-root-token
- meshblu-core-task-check-send-as-whitelist
- meshblu-core-task-check-send-whitelist
- meshblu-core-task-check-token
- meshblu-core-task-check-token-black-list
- meshblu-core-task-check-token-cache
- meshblu-core-task-check-update-device-is-valid
- meshblu-core-task-check-whitelist-broadcast-as
- meshblu-core-task-check-whitelist-broadcast-received
- meshblu-core-task-check-whitelist-broadcast-sent
- meshblu-core-task-check-whitelist-configure-as
- meshblu-core-task-check-whitelist-configure-received
- meshblu-core-task-check-whitelist-configure-sent
- meshblu-core-task-check-whitelist-configure-update
- meshblu-core-task-check-whitelist-discover-as
- meshblu-core-task-check-whitelist-discover-view
- meshblu-core-task-check-whitelist-message-as
- meshblu-core-task-check-whitelist-message-from
- meshblu-core-task-check-whitelist-message-received
- meshblu-core-task-check-whitelist-message-sent
- meshblu-core-task-create-session-token
- meshblu-core-task-create-subscription
- meshblu-core-task-deliver-webhook
- meshblu-core-task-enforce-message-rate-limit
- meshblu-core-task-enqueue-deprecated-webhooks
- meshblu-core-task-enqueue-jobs-for-forward-broadcast-received
- meshblu-core-task-enqueue-jobs-for-forward-configure-received
- meshblu-core-task-enqueue-jobs-for-forward-unregister-received
- meshblu-core-task-enqueue-jobs-for-subscriptions-broadcast-received
- meshblu-core-task-enqueue-jobs-for-subscriptions-broadcast-sent
- meshblu-core-task-enqueue-jobs-for-subscriptions-configure-received
- meshblu-core-task-enqueue-jobs-for-subscriptions-configure-sent
- meshblu-core-task-enqueue-jobs-for-subscriptions-message-received
- meshblu-core-task-enqueue-jobs-for-subscriptions-message-sent
- meshblu-core-task-enqueue-jobs-for-subscriptions-unregister-received
- meshblu-core-task-enqueue-jobs-for-subscriptions-unregister-sent
- meshblu-core-task-enqueue-jobs-for-webhooks-broadcast-received
- meshblu-core-task-enqueue-jobs-for-webhooks-broadcast-sent
- meshblu-core-task-enqueue-jobs-for-webhooks-configure-received
- meshblu-core-task-enqueue-jobs-for-webhooks-configure-sent
- meshblu-core-task-enqueue-jobs-for-webhooks-message-received
- meshblu-core-task-enqueue-jobs-for-webhooks-message-sent
- meshblu-core-task-enqueue-jobs-for-webhooks-unregister-received
- meshblu-core-task-enqueue-jobs-for-webhooks-unregister-sent
- meshblu-core-task-enqueue-webhooks
- meshblu-core-task-find-and-update-device
- meshblu-core-task-forbidden
- meshblu-core-task-get-authorized-subscription-types
- meshblu-core-task-get-broadcast-subscription-types
- meshblu-core-task-get-device
- meshblu-core-task-get-device-public-key
- meshblu-core-task-get-global-public-key
- meshblu-core-task-get-status
- meshblu-core-task-get-subscriptions
- meshblu-core-task-migrate-root-token
- meshblu-core-task-no-content
- meshblu-core-task-protect-your-as
- meshblu-core-task-publish-broadcast-received
- meshblu-core-task-publish-configure-received
- meshblu-core-task-publish-deprecated-subscriptions
- meshblu-core-task-publish-message
- meshblu-core-task-publish-message-received
- meshblu-core-task-publish-subscriptions
- meshblu-core-task-publish-unregister-received
- meshblu-core-task-register-device
- meshblu-core-task-reject-your-as
- meshblu-core-task-remove-device-cache
- meshblu-core-task-remove-root-session-token
- meshblu-core-task-remove-subscription
- meshblu-core-task-remove-token-cache
- meshblu-core-task-reset-token
- meshblu-core-task-revoke-all-tokens
- meshblu-core-task-revoke-session-token
- meshblu-core-task-revoke-token-by-query
- meshblu-core-task-search-device
- meshblu-core-task-search-token
- meshblu-core-task-send-message
- meshblu-core-task-send-message-2
- meshblu-core-task-unregister-device
- meshblu-core-task-update-device
- meshblu-core-task-update-message-rate
Clients
- node-meshblu-socket.io
- node-meshblu-firehose-socket.io
- node-meshblu-http
- node-meshblu-websocket
- node-meshblu-mqtt
- node-meshblu-xmpp
- node-meshblu-amqp
- node-meshblu-coap
- browser-meshblu-http
- swift-meshblu-http
Utilities
Legacy Meshblu 1.x
View it here