I know that redis is a different architecture from mongodb. From reading other posts here and on other sites, it looks like redis is good for scenarios where you don't have as much data... Mongo seems to shine when dealing with very large amounts of data. I also know that Mongo is schema-less.
I need to build a solution that will allow me to:
- have a "master" database that will be persisted to disk
- have n number of "slave" databases..that will only be run from RAM
- i like how mongo stores json documents - not sure if i can accomplish something similar in redis.
- if any node goes off line (including the master node), the rest of the participants "just keep on working". Some slaves will be running on parts of the network that has very high latency issues.
I'm currently reading over the both the Mongo and Redis replication documentation but haven't run into anything that describes this particular use case. Any insights would be appreciated.
EDIT 1
I will need to be able to extract data based on values. So let's say for example, I create the following data in Redis:
127.0.0.1:6379> set users:leto '{"name": "leto", "planet": "dune", "likes": ["spice"]}'
OK
127.0.0.1:6379> get users:leto
"{\"name\": \"leto\", \"planet\": \"dune\", \"likes\": [\"spice\"]}"
At times, I will need to extract data based on values... so finding all users that have "dune" set as the "planet" value. Is this type of querying possible in redis?