Here is a set of interfaces that would allow reading partial data from the AIDA Store.
AIDA object would now have to manage its own data - retrieve missing data from the Store when needed, allow data parts that are not currently in use to be Garbage-Collected, backup temporary data to the Store.
public interface IPartialDataStore extends OnDemandStore { /** * To be used with any simple AIDA object that has no * internal structure, like: ICloud, IDataPointSet, IHstogram */ IPatialData partialData(Object aidaObject, int row); /** * To be used with AIDA objects that has internal structure, * like: ITuple */ IComplexPatialData complexPartialData(Object aidaObject, String pathInObject, int[] rows); } public interface IPatialData { int startRow(); int endRow(); Object data(); } public interface IComplexPatialData { int[] startRows(); int[] endRows(); String pathInObject(); Object data(); }
Main problem with this approach is that AIDA object that requested the partial data does not know what is it getting back - it would need to cast generic Object to something specific, like ICloud, double[], etc.