Multidimensional php array

Hey all.

We are considering moving parts of our data to erospike servers for storing multidimensional php arrays and I have few basic questions that I didn’t find a complete answer on the web. Is it possible to store multidimensional arrays in erospike? Is it possible to update only one value in the stored array? for example: Store this: array(‘key_1’ => array(‘a’ =>‘a_value’,‘b’=>‘b_value’,‘c’=>array(‘c1’=>‘c_1_value’))) And then update only ‘b_value’ OR ‘c_1_value’ without updating or providing the all array once again?!


You can store multidimensional arrays in Aerospike, since those will get serialized to an as_map, and what’s inside of them will convert to the appropriate types, as well.

The other part of your question has to do with updating map values atomically. Right now you have to read the bin containing that value, update it on the application side, and put() it back into the database. In release 3.7.0 of the server atomic list operations were added. Atomic map operations are currently in-progress. Once those are generally available, you will be able to update the value of a field inside a map without first needing to read the entire thing to the application side.