GASSelector Thing
The GASSelector Thing is the default GAS Selector provided by the Remote Access Extension (RAE). Derived from the ThingWorx GenericThing Thing Template, the GASSelector Thing implements the SelectServer service from the GASSelectorService Thing Shape. When it runs, this GASSelector Thing chooses the appropriate GAS for a remote session. The following steps explain how this implementation selects a GAS for a remote session:
1. Query all GAS instances that are both online and enabled.
2. Remove all GAS instances that have no available sessions.
3. Remove all GAS instances whose invalidToken property has a value of true.
4. Any servers found?
If not, throw an error.
If one GAS instance is found, return that instance.
If multiple servers are found, continue to the next step.
5. If multiple instances are found, find the closest instance(s), as determined by the absolute difference in timezone offset.
6. If more than one "closest" instance is found, choose the instance with the least number of sessions. Otherwise, return the instance that was found.
Was this helpful?