Tutorial for the Edge MicroServer > Connecting Your Devices to ThingWorx Platform
Connecting Your Devices to ThingWorx Platform
Before we begin, here are a few definitions to help you understand the ThingWorx world:
The Edge is one or many connected devices in an IoT solution. The devices are typically remote in terms of location in comparison with the ThingWorx Platform
Edge development is developing the IoT-level logic that will run at the Edge.
To enable ThingWorx Edge development, Edge SDKs are maintained in multiple languages. The ThingWorx Edge MicroServer is an application developed with the ThingWorx Edge C SDK.
The ThingWorx Lua Script Resource (LSR) that accompanies the EMS provides a scripting language for writing simple applications to run on devices managed by another Edge device that is running the EMS. The EMS forwards data from the LSR devices to ThingWorx Platform and also forwards messages from ThingWorx Platform to those devices.
Your devices collect data and respond to commands. How do you get that data to the ThingWorx Platform? You could use REST Web Services. While that solution has a high connection overhead, it does run over HTTP. You could use MQTT, but that solution requires an additional MQTT server and additional open ports. The figure below illustrates these two solutions.
This figure also illustrates a third solution. If you need a fast connection that stays on continuously so that the devices are always ready to execute commands and the ThingWorx Platform is always ready to receive your data, the ThingWorx AlwaysOn Over HTTP/HTTPS" solution provides that connection. Further, the connection uses existing open ports on your firewall. The ThingWorx Edge MicroServer provides this connection for your devices because it communicates with a ThingWorx Platform using the ThingWorx AlwaysOn protocol. The ThingWorx AlwaysOn protocol is based on the Open WebSocket Standard RFC6455 (https://tools.ietf.org/html/rfc6455). For more information about the protocol, refer to What is the ThingWorx AlwaysOn Protocol?
Was this helpful?