python django database synch
I use django in project. I have many cron jobs which operate with database. I want to replace cron jobs on other machine and synchroniz开发者_运维百科e processed data with main server. But my host provider doesnt allow external connections to db. How to organize sync. best way? I know what i can pass it via POST request with my own written protocol, buy may be better solution exsists or lib for this?
Are all external connections blocked? If you can get an rsync
daemon to run in the machine you can push (sync, rather) the data from other machines to master and have master process it. This will involve adding some kind of daemon process at the master.
If all connections are indeed blocked you will have to resort to POST or the more tedious one of receiving email attachments and processing them.
Side note: you should think of switching providers post-haste!
This sounds like an awful lot of work for negligible little gain. I would suggest trying an Amazon EC2 micro image and run Django on that for $0.03 US per hour (doesn't appear to be updated on the pricing page just yet but it is in the AWS web console). Then you can do what ever you want.
How does the Web hosting provider block outgoing connections? Can you put an external database server on a popular port like 53, 80, 143, etc., and see if you can connect that way?
精彩评论