@tum-far/ubii-msg-transport-web

0.1.0 • Public • Published

ubii-msg-transport

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.

Table of Contents

  1. Communication Endpoints
  2. Command Line Interfaces (CLIs)
  3. Testing

Communication Endpoints

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.

Dealer-Router Pattern

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.

Request-Reply Pattern

The request-reply pattern is implemented.

CLIs

Tests

  • 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.

Testing

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @tum-far/ubii-msg-transport-web

Weekly Downloads

0

Version

0.1.0

License

none

Unpacked Size

40.9 kB

Total Files

17

Last publish

Collaborators

  • webers
  • zughiko