sql - Strategy for keeping separate Databases in Sync -
i have nosql database using data processing, can used application faster sql can. i'm treating our nosql database cache of information, sql being authority of data, , nosql store being updated changes. right being done through our application, when request comes in change, made in sql database, , nosql database. failing @ times nosql update fails, or other situations cause nosql database out of sync.
i batch update every x minutes, lot of information in data stores, , take hours ensure in sync. have timestamps difference of has been changed, not accurate.
i'm wondering recommended strategy keeping data store(secondary database cache) in sync main store are?
i know i've done messaging in past - jms activemq. send updates nosql store (mongo) using queue. way messages accumulate in queue , if connection nosql store ever got severed, pick left off.
it worked because activemq stable , simple work with.
i've seen done diffs mentioned. introduce date fields on , keep track of latest sync. nice thing approach allows replay transactions modifying last sync date.
one last piece of advice ... write tools around pumping data point point b (in case sql nosql). wrote several tools bulk load nosql store sql @ last job , made life easy if got really out of sync. between scripts , bulk loading processes, recover.
Comments
Post a Comment