Integration with Oracle and Handling JSON

I am trying to use Aerospike as a Cache on top of Oracle Database:

  1. Is there a way to auto synchronize Aerospike and Oracle ? In case we need to write the synchronization logic what would be the best approach to perform delayed writes to Oracle in Java?

  2. I wanted to know the best ways to handle JSON , I have read JSON 1 and JSON 2 but I am looking for :

  • ways to store JSON as is and still be able to query on fields inside it
  • a solution for field length limitation (14 max) in case I want to store JSON field by field as a map or list
  1. None that I’m aware of.

a) ways to store JSON as is and still be able to query inside it. – What do you mean by query fields inside of it?

b) The only way I know of that people get around the bin name limit is by storing their data as blobs, usually with protobuf.

  1. a) For example if I have a JSON object { "field1" : "value1", "field2" : "value2", "field 3": "value3" } If I store lets say 1000 records each with such JSON and different values of the fields, can I query for the rows based on the values of the fields like get all rows where the value of field1 is “value1”. I know for querying like that we would have to store the field in a seperate bin and create index, I wanted to know if there was a workaround for storing JSON as is ( not splitting into nested bins or maps) and querying based on the fields in it

If you want to query by value (map, json, or otherwise) you have to use a secondary index and it has to be in a map/list value or bin as a normal data type (str/long). Otherwise, you’d have to use a reference table or use a scan.

For your use case when you expect table sync between in-memory component and Oracle classic tables, you should look at Oracle TimesTen IMDB. Further details from

HTH