I sort of do this with a live server and an intranet one hiding behind
a firewall that is capable of reaching out to the db server on the
web.

The server behind the firewall is running CF and has its own mySQL
server that holds the data I want to synch up to the web.  The local
CF server reaches out and makes a jdbc connection to the live mysql
server.  Each record on the live system is compared to each record on
the 'local' one -- where the comparison is made by comparing a digest
(hash() ) of the record's contents, which is stored in a field in the
live data.  If the digests match nothing happens, and if they don't
only then does a record update take place.  Using the hash like this
saves an enormous amount of processing time and bandwidth.

This is all written in CF so db platform is irrelevant.  However if
you can use native synching tools your life will be a lot simpler I'd
think.  There's probably a way to do it in mySQL but this routine has
been running well for years so I haven't messed with it.

When doing this its a good idea to only allow the connection to take
place from a known IP.  If the data is in any way critical/private you
need to make the db connection secure.

-- 
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210827
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to