Question

Does anyone have any experience with working with DevExpress' XPO in an environment where the DB is replicated? From my previous question here and one on serverfault, I think it's been decided that replication is the way to go.

The MySQL docs say that all writes need to happen on the master, and all reads have to come from the slave. This makes sense, but now it's a matter of setting up XPO to write to the master (far away), but read from the slave (local).

I received a good response on the DevExpress forums about how it could be done, which I intend to attempt, but I'm wondering if anyone HAS done it, and any insights/gotchas/references they would have.

Was it helpful?

Solution

EDIT: since you don't like the first approach.

here are some master-master replication links in case you haven't seen them.
http://forums.mysql.com/read.php?144,235807,235807
http://code.google.com/p/mysql-master-master/
http://www.mysqlperformanceblog.com/2007/04/05/mysql-master-master-replication-manager-released/ http://www.howtoforge.com/mysql_master_master_replication

Some potential wikipedia entries. http://en.wikipedia.org/wiki/Replication_%28computer_science%29#Database_replication
http://en.wikipedia.org/wiki/Multi-master_replication


Mysql Replication Solutions (Cached from google, the original link is now dead for some reason)


Have you tried the method suggested on the DevExpress forum yet? That's how I would do it.

From Alian Bismark Here

  1. Create SessionA
  2. Call SessionA.Disconect() - Set ConnectionString to SessionA and call SessionA.Connect()
  3. Create SessionB
  4. Call SessionB.Disconect() - Set ConnectionString to SessionB and call SessionA.Connect()
  5. Load obects from SessionA, using XPCollection auxL = new XPCollection(SessionA)
  6. Create objects of SessionB, using B b = new B(SessionB)
  7. Assign fields from object A to object b 8 Save object b

this approach work well with basic objects, if you have relationships etc, you need to resolve the references of objects in session B, using the info of objects of session A.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top