Re: [Zope3-dev] Zope 3 without ZODB (redux)

2007-04-10 Thread Brian Sutherland
On Thu, Apr 05, 2007 at 01:49:07PM -0400, Stephan Richter wrote:
 On Thursday 05 April 2007 12:50, Brian Sutherland wrote:
  Reading this thread made me want to try out some stuff:
 
  � � http://mail.zope.org/pipermail/zope3-dev/2007-January/021612.html
 
  So I've made a jinty-zodbless branch of the trunk and want to ask for
  comment on some of the design decisions I've made there before I spend a
  lot of time writing tests/examples and generally fixing things.
 
  The actual change is:
 
  � � http://mail.zope.org/pipermail/zope3-checkins/2007-April/029097.html
 
 I think this looks good. The only concern I have is with the 
 term IResourceFactory, since it already has a meaning in Zope 3. On the 
 other hand, this is a very different component, so you should be fine.

Ok, I'm mostly done with what I wanted to do on that branch. I want to
give people a chance to review it (feel free to commit directly to the
branch) so I'll leave it on the branch for about 2 weeks before trying
to merge it to the trunk.

 I think that an added bonus would be to provide a demo on how to hook up an 
 ORM  to this new setup.

I added a zodb.app.zodbless module to the branch which is an example of
a non-zodb zope3 app setup.

I probably won't merge zodb.app.zodbless to the trunk because it has
no tests.

As for hooking up an ORM. I'm not sure what is the right way to do it.
I'm even not sure about ORM in general anymore. But if I were to try, I
would start with something very similar to zope.app.zodbless and then
register custom traversers/views. The RDB connections would be defined
in site.zcml as global utilities. The ORM gateways would also be global
utilities, but defined in the zcml of the application.

 
 Regards,
 Stephan
 -- 
 Stephan Richter
 CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
 Web2k - Web Software Design, Development and Training
 

-- 
Brian Sutherland
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 without ZODB (redux)

2007-04-10 Thread Baiju M

Brian Sutherland wrote:


Ok, I'm mostly done with what I wanted to do on that branch. I want to
give people a chance to review it (feel free to commit directly to the
branch) so I'll leave it on the branch for about 2 weeks before trying
to merge it to the trunk.


I am getting an error when running from an instance after
removing zodb section in etc/zope.conf

   File ./bin/runzope, line 48, in ?
 run()
   File ./bin/runzope, line 44, in run
 main([-C, CONFIG_FILE] + sys.argv[1:])
   File /mbaiju/wa/jinty-zodbless/src/zope/app/twisted/main.py, line 
76, in main

 service = setup(load_options(args))
   File /mbaiju/wa/jinty-zodbless/src/zope/app/twisted/main.py, line 
145, in setup

 app_factory = appsetup.setup_app_factory(options.databases)
   File /mbaiju/wa/jinty-zodbless/src/zope/app/appsetup/appsetup.py, 
line 221, in setup_app_factory

 db = multi_database(database_factories)[0][0]
 IndexError: list index out of range


Regards,
Baiju M

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 without ZODB (redux)

2007-04-05 Thread Stephan Richter
On Thursday 05 April 2007 12:50, Brian Sutherland wrote:
 Reading this thread made me want to try out some stuff:

     http://mail.zope.org/pipermail/zope3-dev/2007-January/021612.html

 So I've made a jinty-zodbless branch of the trunk and want to ask for
 comment on some of the design decisions I've made there before I spend a
 lot of time writing tests/examples and generally fixing things.

 The actual change is:

     http://mail.zope.org/pipermail/zope3-checkins/2007-April/029097.html

I think this looks good. The only concern I have is with the 
term IResourceFactory, since it already has a meaning in Zope 3. On the 
other hand, this is a very different component, so you should be fine.

I think that an added bonus would be to provide a demo on how to hook up an 
ORM  to this new setup.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 without ZODB

2007-01-21 Thread Jim Fulton


On Jan 20, 2007, at 3:07 PM, Chris Withers wrote:


Jim Fulton wrote:

...mean that Zope 3 is currently hard-coded to need a ZODB?
That depends on what you mean by Zope 3.  If you define Zope 3  
as  zope.app.server.main, or zope.app.twisted.main, then yes, it  
is. I wouldn't define it that way, although I can see how others  
might. :)


Well, for me, a Zope 3 instance is what you get when you run  
mkzopeinstance. If there's other alternatives to that, I'd be  
interested in exploring them :-)


I think mkzopeinstance if fine, as far as it goes.  I don't plan to  
use it in the future, even for setting up the existing main programs,  
which generally do meet my needs. (I have no interest in running Zope  
w/o ZODB myself.)



If so, how should we go about making this optional?
You would need to write a different main program that did  
something else.


Has anyone else attempted this?


As I have said over and over. Yes.



Does grok have one of these?


I suspect so,.



You would need to understand how the publisher framework worked  
and plug in an alternate publication that traversed to non-ZODB  
objects.


I touched on this with my reply to Philip, but surely the  
publication type should just be operating on objects that implement  
an interface?
It seems odd, at least to me, that I'd need to rewrite publications  
that know about things like http, ftp and webdav just because the  
object I want to publish come from a file system or relational  
database rather than a zodb...


The publisher knows nothing about the application. The publication  
object is the object responsible for providing this integration. It  
is not a very complicated interface to implement.  Depending on your  
needs, you can likely subclass the existing piblication if you wish.


...

(I am willing to put the work in to make this happen if people  
give me some hints...)
Other people have already made this happen. I don't know if any of  
their code is public or if they have written up what they've done.


This is a bit cryptic... are you saying there is an alternative  
zope 3 that already has alternatives to zope.app.server.main or  
zope.app.twisted.main? If so, where are they to be found?


Alan Runyan and Sidnei Da Silva created one of the earliest Zope 3  
applications using SQL Objects.  I don't remember the name of their  
application or what it's status is.  Maybe they'll chime in or you  
can ask them.  Launchpad is a Zope 3 application that doesn't use  
ZODB.  I don't think that code is available.


I'll note, and this will be, hopefully, the last comment on this  
thread, that a Zope 3 application based on relational databases is  
likely to look a lot different than a traditional Zope application.  
In particular, I wouldn't expect such an application to use an object  
filing system model, which is difficult to achieve with an RDBMS.  I  
expect that such an application would simply expose pages in some URL  
space that isn't derived from data structures and that these pages  
would simply call into databases as necessary.  I expect that such an  
application would look a lot like applications built with other web  
frameworks.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 without ZODB

2007-01-21 Thread Sidnei da Silva

On 1/21/07, Jim Fulton [EMAIL PROTECTED] wrote:

Alan Runyan and Sidnei Da Silva created one of the earliest Zope 3
applications using SQL Objects. I don't remember the name of their
application or what it's status is.  Maybe they'll chime in or you
can ask them.


That was the SIP (Sample Inventory Application). It's available from
here: http://sourceforge.net/projects/sampleinventory. It gave life to
'sqlos' (http://codespeak.net/z3/sqlos/), which is a bridge between
Zope 3 and SQLObject. Namely, it provides some custom adapters for
implementing folderish views into a database and coordinates the
SQLObject transaction with the default Transaction Manager in Zope 3.

It actually used the ZODB just to store a root object that was
persistent and implemented a dummy interface, so that we could
register a custom traverser and then delegate to the application from
there. Since the root object was dummy, the ZODB could be easily
thrown away.

Then there is a second one called Snap, which is available from the
cheeseshop (http://cheeseshop.python.org/pypi/snap/0.5). This one uses
most of the approaches discussed here (abusing the 'db' argument,
registering a custom publisher), except using a different 'main'
script. It also uses zope.paste
(http://cheeseshop.python.org/pypi/zope.paste) so that the application
could be configured with Paste.

--
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 without ZODB

2007-01-20 Thread Jim Fulton


On Jan 20, 2007, at 6:09 AM, Chris Withers wrote:


Hey All,

I'm still continuing poking around (when I have the chance) to see  
how I'd get Zope running without ZODB.


Does the following line:

db = zope.app.appsetup.appsetup.multi_database(options.databases)[0] 
[0]


...from:

http://svn.zope.org/Zope3/trunk/src/zope/app/server/main.py? 
rev=71011view=markup


...mean that Zope 3 is currently hard-coded to need a ZODB?


That depends on what you mean by Zope 3.  If you define Zope 3 as   
zope.app.server.main, or zope.app.twisted.main, then yes, it is. I  
wouldn't define it that way, although I can see how others might. :)



If so, how should we go about making this optional?


You would need to write a different main program that did something  
else. You would need to understand how the publisher framework worked  
and plug in an alternate publication that traversed to non-ZODB  
objects. Unfortunately, these frameworks were written before we got  
the doctest religion, so there's no document that I'm aware of that  
explains how to do this. It isn't very complicated. I have a strong  
itch to write such a document, but I don't know when I'll get around  
to scratching it.  I don't know if any of books get into this.


(I am willing to put the work in to make this happen if people give  
me some hints...)


Other people have already made this happen. I don't know if any of  
their code is public or if they have written up what they've done.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3 without ZODB

2007-01-20 Thread Chris Withers

Jim Fulton wrote:



...mean that Zope 3 is currently hard-coded to need a ZODB?


That depends on what you mean by Zope 3.  If you define Zope 3 as  
zope.app.server.main, or zope.app.twisted.main, then yes, it is. I 
wouldn't define it that way, although I can see how others might. :)


Well, for me, a Zope 3 instance is what you get when you run 
mkzopeinstance. If there's other alternatives to that, I'd be interested 
in exploring them :-)



If so, how should we go about making this optional?


You would need to write a different main program that did something 
else.


Has anyone else attempted this? Does grok have one of these?

You would need to understand how the publisher framework worked 
and plug in an alternate publication that traversed to non-ZODB objects.


I touched on this with my reply to Philip, but surely the publication 
type should just be operating on objects that implement an interface?
It seems odd, at least to me, that I'd need to rewrite publications that 
know about things like http, ftp and webdav just because the object I 
want to publish come from a file system or relational database rather 
than a zodb...


do this. It isn't very complicated. I have a strong itch to write such a 
document, but I don't know when I'll get around to scratching it.  I 
don't know if any of books get into this.


I'll be blunt here, I'm more into app frameworks than server frameworks 
so I'm far from best placed to do this work, but I do what to see more 
freedom in where data served by zope 3 comes from and especially I'd to 
find a way to have a zope 3 not rely on a zodb being present at all.


Don't get me wrong, I love zodb, but it runs into problems of political 
acceptance on the one hand and lack of support for high write volumes...


(I am willing to put the work in to make this happen if people give me 
some hints...)


Other people have already made this happen. I don't know if any of their 
code is public or if they have written up what they've done.


This is a bit cryptic... are you saying there is an alternative zope 3 
that already has alternatives to zope.app.server.main or 
zope.app.twisted.main? If so, where are they to be found?


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com