Skip to content

Differences From The OpenDXL Python Client

Jeremy Barlow edited this page Feb 28, 2018 · 3 revisions

The OpenDXL JavaScript Client (Node.js) does not have complete feature parity with the OpenDXL Python Client. The following functionality is currently missing from the OpenDXL JavaScript Client (Node.js):

  • Synchronous client APIs — including sync_request and register_service_sync — are not available in the JavaScript Client (Node.js). Unlike with the Python client, communication with the broker for JavaScript Client (Node.js) methods like connect and subscribe is all done asynchronously as well. Due to the asynchronous nature of JavaScript and a lack of underlying support for synchronous MQTT operations in the MQTT.js library that the JavaScript Client (Node.js) depends upon, it is unlikely that synchronous forms of these APIs will ever be added to the JavaScript Client (Node.js).

  • Unlike the Python client, the JavaScript Client (Node.js) does not provide a method to configure a separate thread pool for handling incoming messages in parallel — including the incoming_message_thread_pool_size setting. Message callbacks received by the JavaScript Client (Node.js) are processed one at a time via the event loop.

  • Client provisioning via a Node.js-based command line interface. Note that the JavaScript Client (Node.js) can, however, make use of a configuration provisioned with the OpenDXL Python client's command line interface.

  • The Python client randomizes the delay between client reconnect attempts. The JavaScript Client (Node.js) currently uses a fixed reconnect_delay for reconnect attempts.

  • Unlike the Python client, the JavaScript Client (Node.js) does not currently provide a way to configure the maximum number of connect_retries for a client connection. The JavaScript Client (Node.js) will indefinitely retry failed connection attempts until a call to either disconnect or destroy is made.

  • The JavaScript Client (Node.js) only sparingly logs messages — for successful and failed connections — and only to the console log. Support for more complete logging, log levels, and pluggable use of logging frameworks will be considered for a future release.

Clone this wiki locally