[Zope] mount zope server (was: Import from Zope-1 to Zope-2)
Michel Pelletier
michel@digicool.com
Thu, 09 Sep 1999 03:57:32 -0400
"Jay, Dylan" wrote:
>
> > -----Original Message-----
> > From: Michel Pelletier [mailto:michel@digicool.com]
> > Sent: Thursday, September 09, 1999 17:34
> > To: Jay, Dylan
> > Cc: zope-dev@zope.org; zope@zope.org
> > Subject: Re: [Zope] mount zope server (was: Import from Zope-1 to
> > Zope-2)
> >
> >
> > "Jay, Dylan" wrote:
> > >
> > > > -----Original Message-----
> > > > From: Michel Pelletier [mailto:michel@digicool.com]
> > > > Sent: Thursday, September 09, 1999 15:20
> > > > To: Jay, Dylan
> > > > Cc: zope-dev@zope.org; zope@zope.org
> > > > Subject: Re: [Zope] Import from Zope-1 to Zope-2
> > > >
> > > >
> > > > "Jay, Dylan" wrote:
> > > > >
> > > > > related note heres another idea I had. How about a product
> > > > that can mount
> > > > > one zope ODB into another. Using XML-RPC or something to
> > > > connect the two
> > > > > sites togeather over the internet. It may not be fast
> > > > enough for using that
> > > > > way but at least it would be really easy for transfering
> > > > data between zope
> > > > > odb's.
> > > >
> > > > We are entertaining the possibility of putting
> > ZPublisher.Client into
> > > > the _ DTML Namespace. I am primarily championing the idea.
> > > >
> > > > 'Client' offers many cool uses. 'Client.Function' will
> > call a remote
> > > > 'Zope Method' which marshals simple types around (int, list,
> > > > tuple etc.)
> > > > and act as Zope oriented RPC. 'Client.call' is a
> > convienent wrapper
> > > > around 'Client.Function'. These both have the upshot of
> > working with
> > > > any
> > > > URL, turning non 'object content' into file Message
> > objects and return
> > > > them in a list.
> > > >
> > > > Even cooler, 'Client.Object' will create surrogate
> > objects of remote
> > > > Zope objects. If you have a DTML Document on machine A, then
> > > > Machine B
> > > > could say:
> > > >
> > > > <dtml-with "_.Client.Object('http://A/YourDocument')">
> > > > <dtml-var id>
> > > > </dtml-with>
> > > >
> > > > and print 'YourDocument'. You can pass autentication
> > > > information in to
> > > > all of the calls to access restricted object.
> > >
> > > So what would happen if this wrapper object was passed back using a
> > > <dtml-return> call or even a __bobo_traverse_ method? Would further
> > > resolution in the object happen using the link or would it
> > break and start
> > > trying to find objects in the local context?
> > >
> >
> > Client.Object returns a real object that would work if passed
> > around in
> > Zope. A 'Client.Object' instance defines a __getattr__ which uses
> > Clients RPC mechanism to get attributes and call methods on remote
> > objects. Client will do the usual marshaling of simple python types.
> > I'm pretty sure Client will also handle the return of multipart
> > content. At least it looks like it from browsing the code.
> >
> > Of course, if Client were added to the namespace, it would need to be
> > documented.
> >
> > -Michel
> >
>
> So mounting a distributed folder would be as simple as a method that did
> <dtml-return "_.Client.Object('http://A/AnotherFolder')"-->
>
It's not really anything like mounting. After I document it a bit and
play with it, I'll let you know.
-Michel
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )