cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Websocket vs ThingWorx Always On Protocol

ranjank
14-Alexandrite

Websocket vs ThingWorx Always On Protocol

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

1 ACCEPTED SOLUTION

Accepted Solutions
anarwal
12-Amethyst
(To:ranjank)

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

View solution in original post

2 REPLIES 2
anarwal
12-Amethyst
(To:ranjank)

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

anarwal
12-Amethyst
(To:anarwal)

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

Top Tags