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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Websocket vs ThingWorx Always On Protocol

ranjank
15-Moonstone

Websocket vs ThingWorx Always On Protocol

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

ACCEPTED SOLUTION

Accepted Solutions
anarwal
13-Aquamarine
(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
13-Aquamarine
(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
13-Aquamarine
(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.

Announcements


Top Tags