Hi, I have a setup where two machines are running identical instances of zope and only one of them is active to the outside world via a firewall. As and when one of them goes down the other is activated by the firewall for the duration that the primary went down. How do I keep these two instances in sync at all times ( mebbe a 10-15 min delay between syncs)?? I looked at ZSyncer but it seems I have to explicitely specify objects to be synced. TIA AM -- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================
On Thu, Dec 19, 2002 at 03:12:20PM -0800, AM wrote:
Hi, I have a setup where two machines are running identical instances of zope and only one of them is active to the outside world via a firewall. As and when one of them goes down the other is activated by the firewall for the duration that the primary went down.
How do I keep these two instances in sync at all times ( mebbe a 10-15 min delay between syncs)??
I looked at ZSyncer but it seems I have to explicitely specify objects to be synced.
Yes, you do. Does only one of these sites get content updates, and the other just mirrors it? If so, i guess you could try to use rsync to sync the one machine's ZODB to the other, but i'd be really wary of that. For one thing, ZODB writes are *not* really append-only, and for another you'd want to be sure that the mirror wasn't doing any writing of its own. To be safe, I've heard many recommendations that both of the zopes that you're syncing should be either shut down, or running in read-only mode. On a project I'm working on now, we are adding zsyncer as part of our content management workflow. We administrate content on a private server and sync to two production servers simultaneously; that way, one production machine can fail over to the other, and the two production machines are always in sync with each other. (We're doing this already, it's just that the interface for zsyncer in CMF is not ready yet so I'm doing all the syncs "by hand"). -- Paul Winkler http://www.slinkp.com "Welcome to Muppet Labs, where the future is made - today!" Look! Up in the sky! It's SLICK SLUDGE SPOOK! (courtesy of isometric.spaceninja.com)
You could use ZSyncer and set up a cron job to automate its calling either through xmlrpc or httplib. I'd personally use xmlrpc from a cron job. We're doing this in several places and it works very well. Something like this: import xmlrpclib server = xmlrpclib.Server('http://localhost:8080/') server.someScript() This script should call the ZSyncer object with the appropriate properties set. Take a look at the code for ZSyncer and you should be able to find what you're looking for. Kevin -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of AM Sent: Thursday, December 19, 2002 6:12 PM To: zope@zope.org Subject: [Zope] syncing two instances of zope Hi, I have a setup where two machines are running identical instances of zope and only one of them is active to the outside world via a firewall. As and when one of them goes down the other is activated by the firewall for the duration that the primary went down. How do I keep these two instances in sync at all times ( mebbe a 10-15 min delay between syncs)?? I looked at ZSyncer but it seems I have to explicitely specify objects to be synced. TIA AM -- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ================================================================== _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, Dec 19, 2002 at 06:27:40PM -0500, Kevin Carlson wrote:
You could use ZSyncer and set up a cron job to automate its calling either through xmlrpc or httplib. I'd personally use xmlrpc from a cron job. We're doing this in several places and it works very well. Something like this:
import xmlrpclib server = xmlrpclib.Server('http://localhost:8080/') server.someScript()
This script should call the ZSyncer object with the appropriate properties set. Take a look at the code for ZSyncer and you should be able to find what you're looking for.
That would do the job, BUT be aware that when you sync a folder using zsyncer, it basically: 1) Exports the folder, but puts the export data into RAM instead of disk. 2) sends the export data across the network 3) Imports the export data on the remote server. I have been having issues with using zsyncer on folders containing 100+ MB of data. It seems to work, but sometimes i never get an acknowledgement from the remote that it's done. And you can't just sync the root folder anyway - you'd *have* to at least select objects within the root folder to sync. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's PROFOUNDLY POUNCING THING PLUMBER! (courtesy of isometric.spaceninja.com)
AM writes:
I have a setup where two machines are running identical instances of zope and only one of them is active to the outside world via a firewall. As and when one of them goes down the other is activated by the firewall for the duration that the primary went down.
How do I keep these two instances in sync at all times ( mebbe a 10-15 min delay between syncs)??
I looked at ZSyncer but it seems I have to explicitely specify objects to be synced. You may think about using ZEO.
The new ZEO2 may already support replication. If not, I was told that Zope.com has a (commercial) product that can do this. Dieter
participants (4)
-
AM -
Dieter Maurer -
Kevin Carlson -
Paul Winkler