Angelo Giuffredi
Angelo Giuffredi

Reputation: 943

MongoDB in "subscribe" on Redis

Is it possible to configure an architecture with Redis in "master" and MongoDB in "slave" in order to automatically persist in MongoDB some volatile information in Redis?

Example: persist in MongoDB a list of notifications for a user created in Redis.

Upvotes: 1

Views: 349

Answers (1)

Didier Spezia
Didier Spezia

Reputation: 73216

Not directly.

However, you could imagine to maintain a synchronization list in Redis to queue all the changes that have to be sent to MongoDB. Then, you can add a daemon listening to the Redis synchronization list, and applying the changes to MongoDB.

The implementation of a true guaranteed delivery mechanism (i.e. once and only once semantic) is difficult though.

Upvotes: 1

Related Questions