ConnectedThingClient : How to use in applications running for a long time
Hi,
I have a java web application that needs to connect to Thingworx foundation server and fetch data according to user's actions. One of the scenarios involves sequence of these operations -
1. Metadata creation - Fetch all ThingNames, Fetch properties of each Thing
2. Data operations - Fetch and filter historical data of Things with the help from the above fetched metadata.
The first metadata creation is a heavy task and might be dealing with things counting in millions. This will be done in custom logic of chunks so that invokeservice request won't timeout.
The second operations also needs to deal with huge data.
During this time, how is the client supposed to be used? Do we disconnect/shutdown client after every invokeservice operation completes, and start client again at next service call? Or we simply check for isConnected() before invokeservice to ensure no NullPointer and start client if needed?
Also, what is difference between client.shutdown() and client.disconnect() ? Can these methods be used interchangeably?
Thank you!

