Problem
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).
Naive Ignite Implementation
- Use ignite continuous query to monitor changes, upon modification, update another (value->key) cache
Are there better way of achieving this goal? Is ignite the wrong tool to use?