just brew it! wrote:What are the typical causes of the connection to the server going down? Maybe you should be addressing that instead. If the problem is your ISP, maybe a backup link from another ISP that you can fail over to would be a good idea?
If you can't improve the network reliability to the point where it isn't an issue, then what you've proposed is probably a reasonable (if somewhat complex, and still imperfect) mitigation measure.
morphine wrote:I'll have to re-read the OP with more attention, but you can, in fact, use MySQL (or another RDBMS) to do inserts/updates from several sources onto the central. There is a configurable parameter that specifies how you want to stagger new table IDs, ex: master = N, slave_one = N+1, slave_two= N+2, and so on.
Just so I'm clear: the scenario in question is mostly concerned about pushing data onto the central, or is there a specific requirement to also pull up the latest data and have it locally as well?
cheesyking wrote:How wedded are you to SQL? NoSQL databases tend to handle this sort of thing more easily. I'm guessing you're already to far down the SQL path to start again almost from scratch but I just thought I'd mention them anyway. It's also entirely possible the NoSQL DBs wouldn't be suitable for other reasons.
Personally I've been using CouchDB for a while so I'll give you a quick summary of how it works if you're interested...
Couch doesn't use auto-increment fields for primary keys so when two DBs synchronize you don't have to worry about key conflicts or anything like that.
All your data is stored in "documents" which have a UUID and a revision number. When you update a document its revision number changes so when two DBs sync this revision number is used to work out which document is the newest one. Obviously there's a problem if the same document is updated on both DBs at the same time, that can only be resolved by a human. However if you create your documents carefully you should be able to avoid conflicts like that ever happening.
By the sound of it information about any particular card is only being updated from one location at a time anyway so it should be pretty simple to set up.
Users browsing this forum: No registered users and 1 guest