This is the repository for Ubii message transport (web). It contains everything about how ubii nodes and devices communicate with each other. If you are interested in what they say to each other, visit the ubii-msg-format repository.
We distinguish between one-way communcation patterns (only the client can open a message exchange) and two-way communication patterns (both sides, the clients and the server can send messages to the other side).
Communication patterns have multiple communication endpoints. There are client and server communication endpoints. Implementations must provide methods for binding and message sending. In addition, two-way communciation implementations must implement ping-pong functionality to provide checks of the connection status across different implementations.
The dealer router pattern is implemented as ZMQ connection endpoint. It consists of any number of 'zmqDealer' endpoint objects and a 'zmqRouter' endpoint object. It is a two-way communication pattern, so communication is possible in both directions.
With this pattern, received messages always have an envelope that contains the ID of the sender in addition to the plain payload. This should be taken into account in further implementations or processing of received messages.
Dealers communicate with the router by specifying the host and port. After a dealer has communicated with the router, routers can communicate with dealers by specifing the id of the dealer.
The request-reply pattern is implemented.
- Run
npm test
to process all standard tests (no round trip time tests). - Run
npm run-script test-rtt
to process all round trip time tests. - See the Testing section for more details on tests.
This module uses the AVA test runner. You can add new tests to the test folder. Entry point for the test runner is test.js within the test folder. See the AVA Documentation for more details on how to create new test cases for AVA.