The Redis module implements two strategies for key serialization depending on the number of entity key columns:
* Single key: Plain usage of the key value within the entity key representation{code}MyTable:1234{code} * Composite key: Serialize key/value tuples to JSON and use the JSON string as part of the entity key {code} MyTable.{"key1":"keyvalue1","key2":"keyvalue2"} {code}
While the first strategy is fine, the second strategy raises some issues:
* It's hard to read * Redis Cluster uses hash tagging and uses the value between the curly braces {...} to calculate the hash tag
We should rethink the second strategy and maybe apply a similar pattern to the CouchDB implementation. |
|