Reported by rbrewer, Mar 17, 2010
Currently all interpolated values are calculated each time they are requested, which is very inefficient, especially for virtual sources with many subsources. The cache should be shared between requests via the REST API and the Google Visualization data source API.
One solution is to cache the interpolated SensorData objects as they are created. Hackystat is using the JCS system to do this, and the UriCache class has example code.
Cache invalidation is something that needs to be considered. If data being added is always later in time than the last stored data (the most common case from meter data) then the cache doesn't need to be invalidated. However, tracking whether this constraint is violated might be time consuming, so for the first pass the cache will have to be cleared manually if data is filled in for previous times.
Mar 17, 2010 philipmjohnson
I am making an independent google project called simplejcs that will make it easier
to implement this feature. Stay tuned.
Mar 22, 2010 philipmjohnson
Release now available:
Unfortunately, this uses the official 1.3 release, which has some bugs related to
hierarchical key management, as shown in a SimpleJCS test case which is documented in
the following issue:
This should not prevent usage of the library. Newer release candidates appear to
break more significant features. I have posted to their mailing list and we'll see
what happens.
Reported by rbrewer, Mar 17, 2010 Currently all interpolated values are calculated each time they are requested, which is very inefficient, especially for virtual sources with many subsources. The cache should be shared between requests via the REST API and the Google Visualization data source API.
One solution is to cache the interpolated SensorData objects as they are created. Hackystat is using the JCS system to do this, and the UriCache class has example code.
Cache invalidation is something that needs to be considered. If data being added is always later in time than the last stored data (the most common case from meter data) then the cache doesn't need to be invalidated. However, tracking whether this constraint is violated might be time consuming, so for the first pass the cache will have to be cleared manually if data is filled in for previous times.
Mar 17, 2010 philipmjohnson I am making an independent google project called simplejcs that will make it easier to implement this feature. Stay tuned.
Mar 22, 2010 philipmjohnson Release now available:
http://code.google.com/p/simplejcs/
Unfortunately, this uses the official 1.3 release, which has some bugs related to hierarchical key management, as shown in a SimpleJCS test case which is documented in the following issue:
http://code.google.com/p/simplejcs/issues/detail?id=1
This should not prevent usage of the library. Newer release candidates appear to break more significant features. I have posted to their mailing list and we'll see what happens.
I am adding this to IvyRoundup now.
Mar 22, 2010 philipmjohnson Now in ivyroundup:
http://ivyroundup.googlecode.com/svn/trunk/repo/modules/edu.hawaii.ics.csdl/simplejcs/1.0.322/ivy.xml