memcached - Best strategy for C(n,2) keys in redis -


i'm working on project i'm going explain you.

i have n(10000 < n < 100000) objects, each of them have relationship each others can represented integer. need store c(n,2) relationships in database , able retrieve of them randomly quick possible.

the relationships calculated algorithms. different algorithms, have different set of relationships. algorithms changing, active algorithms limited less 3.

i wish keep relationships in memory possible, or in disk if random retrieval of them faster recalculation.

i found redis best thing try, have 2 billion objects wish reduce memory usage as possible.

each object , each algorithm represented uuid.

my question is, best strategy? should use redis hashmap , how? should use redis vm? how design keys(since long if concat uuids)?

if cannot store data in main memory, , need use disk, redis not correct choice. vm code deprecated redis 2.4, , removed in redis 2.6.

also not efficient store relationships between uuids, because uuids cannot encoded in single 64 bits integer. redis space optimizations sets rely on fact object references 64 bits integers (and typically, relationships materialized sets redis).

i think better served graph database such neo4j or orientdb purpose store kind of relationships.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -