|Replicating documents based on document's properties||Vaevictus||2/26/11 4:29 AM|
Incorrectly posted this over on mongodb-csharp:
Consider a web application that has several instances on 2 interconnected lans: (excuse the ascii)
LAN1 LAN1 LAN2
=========== =========== ==========
WebServer1 | --------------> Webserver2 ------------------>Webserver3
MongoServer1 | <------------- MongoServer2 <---------------- Mongoserver3
=========== ============ ===========
Everything document created on webserver1 needs to go to webserver2 and vice versa
Documents that have a certain flag set (eg to releasableToLAN2) are allowed to be replicated to webserver3
Does mongodb support this selective replication of data based on the metadata of the document?
Also, how well does the replication perform over slow/unstable links. Assume that the interconnection between lan1 and lan2 is 1mbit and very high latency (600ms+)
PS. the actual architecture has more complexities - if the above is possible I will make a more detailed post with a jpg
|Re: [mongodb-user] Replicating documents based on document's properties||Scott Hernandez||2/26/11 7:20 AM|
Mongodb does not support partial replication. To do something like
this you would have to write your own replication algorithms.
|Re: [mongodb-user] Replicating documents based on document's properties||Vaevictus||2/26/11 7:27 AM|
Thanks for your response. That's a shame. Do you think it is something that will ever be supported in the future?
|Re: Replicating documents based on document's properties||rainier2||2/26/11 8:16 AM|
Check out Wordnik's Java-based replication tools: https://github.com/wordnik/wordnik-oss
(specifically com.wordnik.system.mongodb.ReplicationUtil). I think
they may be just what you are looking for. Also check some of their
blogposts (http://blog.wordnik.com/12-months-with-mongodb). I tried
to find the video from MongoSV addressing this issue specifically, but
didn't see it.
One great thing about Mongodb replication is that it is easily
hackable, since the oplog is a regular collection (rather than MySQL,
which has a different binary log format). It might not be a feature
written by 10gen, but it should fit comfortably with the mongo stack.
No shame in that.
|Re: [mongodb-user] Replicating documents based on document's properties||Scott Hernandez||2/26/11 8:46 AM|
It isn't on the immediate road map but people have rolled their own
and there may be community supported options which aren't part of the