Product Documentation

FairCom Connector for ThingWorx AlwaysOn

Previous Topic

Next Topic

Three ThingWorx Update Modes

Communication between FairCom Edge and ThingWorx happens using the ThingWorx AlwaysOn connector. Because FairCom Edge tables can accept new records so quickly, it is possible to insert records into FairCom Edge tables far faster than the new values can be sent to ThingWorx. FairCom Edge provides three different ways (modes) of dealing with this speed mismatch:

When a new record is inserted into an FairCom Edge table...

  • Mode 1 - Sends every new record to ThingWorx with no regard to ThingWorx falling behind.
  • Mode 2 - Sends as many records as possible, but skips records as necessary, to keep ThingWorx from falling behind.
  • Mode 3 - Limits the send rate to one record every X seconds, where X is chosen by the user.

FairCom Edge allows you to select these modes on a per-column / per-property basis. However, FairCom Edge does not allow you to mix modes 1 and 2 for columns from the same table in the same ThingWorx Thing. You can mix modes 1 and 3 or 2 and 3 in a single table, though. In other words, if one column of an FairCom Edge table uses mode 1 to transfer data from FairCom Edge to the ThingWorx Thing, other columns from that table can use mode 1 or 3, but not mode 2.

Mode 1 uses FairCom's new "Store & Forward" functionality, which greatly enhances reliability. If records are inserted into the FairCom Edge table while the communications channel to ThingWorx is inoperable, or while the ThingWorx server is down, those records won't be lost. Once the ThingWorx machine is back online, with communications restored, FairCom Edge sends ThingWorx the records that it missed during the down time. See ThingWorx Store and Forward for details.

Modes 2 and 3 are similar. Both prevent ThingWorx from falling behind by limiting how often updates are sent to ThingWorx. Mode 3 lets you explicitly set the update rate ("update ThingWorx every X seconds"), while mode 2 automatically adjusts the update rate to be as fast as possible without falling behind. Another use of mode 3 is to reduce network traffic by having FairCom Edge refuse to update a property in ThingWorx unless at least X seconds has elapsed since the last time it updated the property (or, the value in ThingWorx is more than X seconds out of date).

You will configure the update mode in the sections of the tutorial titled Mapping Properties and A Guide to the Screens.

In This Section

More details about the ThingWorx Update Modes

Previous Topic

Next Topic

More details about the ThingWorx Update Modes

Mode 1 - Send Every New Record to ThingWorx

When a new record is inserted into the FairCom Edge table, the value will be sent to ThingWorx as soon as possible, with no records being skipped. Because every record is sent, inserting records into the FairCom Edge table too quickly can result in ThingWorx falling behind, making the values in ThingWorx more and more out of date. This can be prevented by limiting how often records are inserted into the FairCom Edge table, or by using Modes 2 or 3. The actual rate at which records can be sent to ThingWorx is about one per second.

Outage: If new records are inserted into the FairCom Edge table while ThingWorx is down or NOT connected, all of them will be sent to ThingWorx when ThingWorx reconnects.

Mode 2 - Skip Records as Needed

When a new record is inserted into the FairCom Edge table, FairCom Edge will try to send the new value to ThingWorx as fast as possible, but there is no guarantee that every single record will be sent. FairCom Edge keeps ThingWorx as "up to date" as possible by skipping records if they would cause ThingWorx to fall behind. The actual rate at which records can be sent to ThingWorx may be around one per second.

Outage: If new records are inserted into the FairCom Edge table while ThingWorx is down or NOT connected, only the last one will be sent to ThingWorx when ThingWorx reconnects.

Mode 3 - No more than One Update Every X Seconds

When records are inserted into the FairCom Edge table, a new value will be sent to ThingWorx at most once every five seconds.

A provision is made that the ThingWorx value will not be more than five seconds out of date, though... (Let's say the FairCom Edge table holds '7'. Two new records are quickly inserted, with an '8' and then a '9'. The '8' is immediately sent to ThingWorx. The '9' is not sent until X seconds elapses, and then the '9' is sent to ThingWorx.)

Outage: If new records are inserted into the FairCom Edge table while ThingWorx is down or NOT connected, only the last one will be sent to ThingWorx when ThingWorx reconnects.

TOCIndex