1

Objective:

The objective to be able to store list of json in Redis and to be able to manipulate it right in Redis itself.

Problem Statement

The problem is that manipulating a list of JSON has required us to bring all the data in the application before being able to do anything reasonable with it. For example, filtering list of JSON where JSON strings have a certain value against a certain JSON path and things like that. This has slowed the application capability and defied the purpose of having Redis.

Possible Solutions That We Are Considering

  • We were thinking of using RedisJSON to support JSON natively in Redis but it doesn't seems to be meeting our requirement. Please correct me if I am wrong. [I am very much new to Redis.]
  • The other solution that we are considering is Lua scripting on the Redis server itself or using a library like, scala-redis to execute Lua scripts on Redis.

Please suggest us on:

  1. If there is a better way to represent such a data in Redis?
  2. If RedisJSON or similar modules could solve our problem in their capacity?
  3. If we are right about using library like scala-redis?

Please let me know if this is the right place for this question or this question needs to be expressed in a better way.

Guy Korland
  • 9,139
  • 14
  • 59
  • 106
iamsmkr
  • 800
  • 2
  • 10
  • 29
  • You have to keep in mind that Redis queries are geared towards a `key-value` semantics. Although Redis supports a lot of data structure types for values `values`, but the querying capabilities are still mostly about `keys`. Which means that you will need to put a lot of thought into actual mapping. – sarveshseri Jun 19 '18 at 07:46
  • I agree but in our use case there is no way we could create a K-V pair for every entry in the list. It would be too noisy for a schema! – iamsmkr Jun 19 '18 at 09:01
  • 1
    Please refer to https://github.com/RedisLabsModules/rejson/issues/73#issuecomment-398397344 – Itamar Haber Jun 19 '18 at 15:56

0 Answers0