[Zope] Getting started questions...
James A. Hillyerd
jamesh@altavista.net
Wed, 17 Feb 1999 14:26:05 -0800 (PST)
On Wed, 17 Feb 1999, Christopher G. Petrilli wrote:
> On Wed, Feb 17, 1999 at 01:28:16PM -0800, James A. Hillyerd wrote:
> > The project has an interesting requirement, and I'm not sure how to
> > accomplish it using the Zope Platform. I need to be able to package up
> > the project and distribute it to multiple web servers automatically. If I
> > did this project using cgi/perl and html I would probably just tar
> > everything up and put it on an ftp server, which the other servers could
> > check daily and update their code/html when a new tarball was available.
>
> Hmm... [ignores what he reads later] if everything is in the object
> datbase, then you can simply move the object database :-) AT least this
> works in theory <wink> I've done it a few dozen times without problems,
> but that doesn't mean it wouldn't break for someone less skilled in the
> art of hand-waving.
>
I'd rather avoid this, since it will be an automated process, and I don't
want to lose any sleep over hundreds of servers silently crashing. I
think this would also make it easier for me to debug and backup individual
servers.
> Well, certainly if you plan to keep NOTHING in the object datbase this
> might be good, but don't know (BTW, Bobo is now called ZPublisher :-).
> You should look into the SQLMethods side fo the house (ZSQLAdapter or
> some such), which allows for some really elegant access to a relational
> model. This would let you keep more "static" stuff in the object
> database, and everything else in the SQL database as is appropriate for
> some projects.
>
Not all of the servers will have full time internet connections, so I
can't rely on accessing them via the web. I think that copying a specific
server's database over the previous Zope database, restarting Zope,
editing properties and then repeating the process for the next server
would be a pain. I'd much rather pull up pico and edit a static
configuration file.
> > In other words, I'd like to be able to walk over to a machine with my SQL
> > database and apache installed on it and type:
> >
> > rpm -i zope-ver.rpm
> > rpm -i zope-pcgi-ver.rpm
> > tar xzf my_project.tgz
> >
> > Then be able to use my project from a web browser, without having to go in
> > and configure it as a product or extention in Zope.
>
> I don't think anything in the web world this "complex" will ever be that
> simple... hell, Apache doesn't work THAT easily most of the time.
>
I'm sure the setup won't be that simple, but the main point I was trying
to make was that I don't want to have to open a web browser and configure
things if I can help it. I wouldn't mind popping into Zope to configure a
cgi-bin directory (or something similar, whatever I need to publish
objects with ZPublisher).
> You need to define what your project is more accurately for it to be
> understandable... is it the pages and the SQL queries? Or does it
> include the database?
>
Each server will maintain a seperate SQL database. I'd like to try and
build all of the business logic into python objects, and call these
objects from DTML and in some cases directly from the URL.
I guess most of this I can figure out on my own, but I need a push in the
right direction.
From the Tech Intro to Object Publishing, there is an example "module"
Hello.py:
"""A simple Zope application"""
def sayHello(name='World'):
"""Display a greeting"""
return "Hello %s!" % name
They show it being called as:
http://www.mydomain.com/cgi-bin/Hello/sayHello
My apache server is setup with the mod_rewrite so that the zope is
accessed as http://localhost/Zope/
What do I need to do to install and experiment with this example?
-james
[] James A. Hillyerd <jamesh@altavista.net> Java Developer
[] HyperGlyphics: http://www.hyperglyphics.com/
[] GPG Public Key Fingerprint for 1024D/9F956CDE (Expires 2000-02-01):
[] C86F B073 92DF 1E24 EF0B 0118 6061 0FEC 9F95 6CDE