Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
What’s the best way to cache data in ThingWorx?
Also, can Ignite be utilized for caching in any way?
I am aware that it depends on use case and scenario. I would like to know what are the feasible options available or supported by the ThingWorx platform.
Thank you in Advance.
-Abhiram
The answer really depends on the amount of data and your access patterns. For large amount of data, I'd delegate caching to an external system like Redis and access it via a Java extension (no, I'm not aware of existing extensions for that, but implementing a new one is easy). One of the key questions you'd need to ask yourself is whether you cache for reducing latency or increasing the overall throughput. If it's the latter -- an external system is almost always a better choice.
For small and medium data volumes, non-persistent, non-logged "basic" (numbers, strings) properties are managed entirely in memory, and are thus fast enough for most caching scenarios. Infotables are slow. Reading/writing properties under Administrator will likely be (much?) faster, as ThingWorx won't perform permission checks. If you use shared caches, you'd need to be careful with threads synchronization, which ThingWorx doesn't do.
I'm not sure about the User session performance characteristics, as it is probably implemented via Tomcat session, which might have its own performance overhead, associated with serializability and thread safety. This is something you'd need to test.
Can't say anything about Ignite, sorry.
/ Constantine