Skip to main content
1-Visitor
December 1, 2020
Solved

Websocket vs ThingWorx Always On Protocol

  • December 1, 2020
  • 1 reply
  • 2110 views

Could somebody let me explain both protocols and also the most apt difference between these two?

Best answer by anarwal

Hi @ranjank ,

 

  • AlwaysOn™ is a protocol for the message packets themselves
  • The difference between this and the WebSocket protocol is that the AlwaysOn™ protocol determines the format of the bytes within the messages, while the WebSocket protocol directs how the messages gets sent across networks
  • The benefit to using a WebSocket is the persistent secure connection kept open via the many benefits of the AlwaysOn™ protocol:
    • Low latency
    • Bi-directional communications
    • Configuration options for custom tuning to reduce power consumption and bandwidth usage
    • Allows for efficient transmissions of ThingWorx property, service, and event requests
  • Types of AlwaysOn™ messages:
    • AUTH (mentioned below) - required call to login when EMS is started
    • BIND - called when auto-bind options are defined in the config.json file or the LSR is connected and configured properly
    • API REQUEST - message type used to send property, service, and event updates
  • Tunnels do not use the AlwaysOn™ protocol, but rather each new tunnel creates its own WebSocket connection
    • Transfers bytes in no particular format as no specific protocol is used here
    • Sends raw tunneled bytes over the socket
  • Anything done with service invocations (e.g. file transfers or remote service calls) uses the AlwaysOn™ protocol
  • For further reading on the AlwaysOn™ protocol, and a complete overview of the EMS, see the Edge Help Center
  • Additional note about custom usage: the ThingWorx development team reserves the right to modify the AlwaysOn™ protocol whenever desired.

 

Regards
Ankur

1 reply

anarwal5-Regular MemberAnswer
5-Regular Member
December 1, 2020

Hi @ranjank ,

 

  • AlwaysOn™ is a protocol for the message packets themselves
  • The difference between this and the WebSocket protocol is that the AlwaysOn™ protocol determines the format of the bytes within the messages, while the WebSocket protocol directs how the messages gets sent across networks
  • The benefit to using a WebSocket is the persistent secure connection kept open via the many benefits of the AlwaysOn™ protocol:
    • Low latency
    • Bi-directional communications
    • Configuration options for custom tuning to reduce power consumption and bandwidth usage
    • Allows for efficient transmissions of ThingWorx property, service, and event requests
  • Types of AlwaysOn™ messages:
    • AUTH (mentioned below) - required call to login when EMS is started
    • BIND - called when auto-bind options are defined in the config.json file or the LSR is connected and configured properly
    • API REQUEST - message type used to send property, service, and event updates
  • Tunnels do not use the AlwaysOn™ protocol, but rather each new tunnel creates its own WebSocket connection
    • Transfers bytes in no particular format as no specific protocol is used here
    • Sends raw tunneled bytes over the socket
  • Anything done with service invocations (e.g. file transfers or remote service calls) uses the AlwaysOn™ protocol
  • For further reading on the AlwaysOn™ protocol, and a complete overview of the EMS, see the Edge Help Center
  • Additional note about custom usage: the ThingWorx development team reserves the right to modify the AlwaysOn™ protocol whenever desired.

 

Regards
Ankur

5-Regular Member
December 2, 2020

@ranjank ,If my response has answered your question, please mark as Accepted Solution, for the benefit of others who may have the same question.