raindarr / wattdepot

Automatically exported from code.google.com/p/wattdepot
0 stars 0 forks source link

Add caching for interpolated values #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by rbre...@gmail.com on 18 Mar 2010 at 12:32

GoogleCodeExporter commented 8 years ago
I am making an independent google project called simplejcs that will make it 
easier
to implement this feature. Stay tuned.

Original comment by philipmj...@gmail.com on 18 Mar 2010 at 4:07

GoogleCodeExporter commented 8 years ago
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.

Original comment by philipmj...@gmail.com on 23 Mar 2010 at 12:41

GoogleCodeExporter commented 8 years ago
Now in ivyroundup:

http://ivyroundup.googlecode.com/svn/trunk/repo/modules/edu.hawaii.ics.csdl/simp
lejcs/1.0.322/ivy.xml

Original comment by philipmj...@gmail.com on 23 Mar 2010 at 2:17