Pre-calculated JOIN queries as map in ignite -


i new ignite , pocing currently. have question regarding ways store/load data in map. it's bit tricky , strange requirement. example:

i have employee, department, project [tables in database] + [entity classes in application]. don't want store each of these in separate map in memory rather want store pre-calculated join results in designated map.

dynamic query : select employeeid,employeename,departmentname,projectname,projectstart,projectend employee,department,project $join

i know @ least before hand that, key fields , value fields. above example, can denote "map" shown below,

key : set (employeeid,departmentid) value : list (employeename,value),(departmentname,value),(projectname,value),(projectstart,value),(projectend,value)

so can see every pair of (employeeid,departmentid) having multiple values associates it. dilemma don't have domain model/entity pojos before hand. such dynamic views/maps can added flexibly don't have go , change domain/entity model every time. we don't want joins/calculations every time thousands of such client request on every call.

is possible fire such join queries using maploader or other means? can think of map (key=set, value = list)as data structure store final results.any other better alternative?

could there performance issues while retrieving values such map based on keys? memory optimizations should take care of?

thanks, dharam

you not required use sql queries. it's fine use ignite simple caching mechanism db query results. each time query executed, save result in ignitecache , use cached result same query requested. can use expirations [1] and/or evictions [2] make sure don't have data in cache , don't run out of memory.

[1] https://apacheignite.readme.io/docs/expiry-policies

[2] https://apacheignite.readme.io/docs/evictions


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -