Reputation: 205
Need to implement a bi-directional key value store. Cache entry is populated into the cache using a key (String) mapping to a value(Long). However, the the cache needs to handle both key->value and value->key lookup. What is the most efficient way to do this?
Note: value->key mapping does not need to be synchronized with key->value in real time, but cannot fall behind key->value mapping for too long (10-15 seconds max).
Are there better way of achieving this goal? Is ignite the wrong tool to use?
Upvotes: 0
Views: 441
Reputation: 19313
You can use SQL queries and have secondary index on value. Your proposed approach should also work.
Upvotes: 1