[Grok-dev] Re: beginners questions...

Martijn Faassen faassen at startifact.com
Tue May 8 17:25:35 EDT 2007


Hello,

Oliver Oli wrote:
> I stumbled upon Grok and I had to try it (end of April). Today I
> wanted to update to the newest version, but it doesn't build anymore
> (same problem with  0.9dev-r74877 package and svn trunk):
> 
> [...]
> zc.buildout.easy_install: Got zope.event 3.3.0
> Couldn't find index page for 'zope.app' (maybe misspelled?)
> zc.buildout.easy_install: Getting new distribution for zope.app
> While:
>  Installing instance
>  Getting distribution for zope.app
> Error: Couldn't find a distribution for zope.app.

> With an older version, that compiled fine, 

Are you using grokproject? Or do you use an svn checkout of the grok 
trunk? Or are you describing having tried both?

I've just tried to buildout the trunk and I can replicate your error. 
The problem appears to be in grokwiki: it has a 'zc.sourcefactory' 
dependency in its setup.py which tries to pull in a lot of eggs and 
there is a dependency issue in these eggs.

I'm not sure why Christian Theune actually added this dependency to 
grokwiki's setup.py, as Grokwiki itself doesn't appear to make use of 
this. I've removed this dependency and checked in a new version. Please 
let us know if this works for you!

Thank you for bringing this to our attention!

You mention you also have the problem with the 0.9dev package. I'm a bit 
surprised as that, as grokwiki shouldn't be included in that. Can you 
explain what is going on there?

> the show stopper was the
> absolute links that Grok (or Zope) uses in the web admin interface. I
> tried to use Grok through a reverse proxy (nginx), but the absolute
> http://127.0.0.1:8080/* links prevented it. Is there a way to force
> relative links or set the host name and port number?

I'm not sure what you're trying to accomplish. If you use Apache you 
could use rewrite rules to rewrite the hostname and port number. Zope (2 
and 3) can work with rewrite rules and fix the URLs properly. If that's 
an option for you I will look up some rewrite rules for you.

> Is anyone working on better documentation (or any documentation at all
> beside the tutorials).

Since you say "better documentation", does this mean that the tutorial 
is not satisfactory in some way (besides the incompleteness)? Please 
give us suggestions on how to improve the text that is already there if 
this is something that is a problem for you.

One thing we are aware of is that the tutorial is at present incomplete. 
  There is much more to be written. I need to sit down and write some 
more text soon. I appreciate help on this. :)

We also are still endlessly waiting for volunteers who want to write a 
reference. (this is of course a hint to anyone reading this message that 
they should consider volunteering for this duty. I'd be happy to help 
out, but someone else needs to drive this. Don't take this too personal 
Oliver, I try this all the time :)

> Is there any way of avoiding stopping and restarting the zope server,
> when doing development?

Unfortunately not (except if you only change page templates). I believe 
Philipp and Christian have been doing some research into making reload 
works, but this is a hard problem to solve due to low-level Python 
issues, so I think this work is currently on hold. I do believe there's 
a glimmer of hope that this will eventually be solved, but I'm not up to 
speed on the details.

> Last question: How is the performance of Grok? Is there any overhead
> in comparison to plain Zope 3? 

There shouldn't be any run-time overhead compared to Zope 3 - the main 
difference is in the way configuration happens during startup (and I 
don't know whether Grok's approach is faster than ZCML or not there), 
afterwards the differences should be minimal. The performance should 
therefore be very similar to Zope 3.

I don't know whether anyone did an extensive performance comparison, but 
I believe people generally consider Zope 3's performance to be 
reasonable for most purposes. Performance complaints are not common in 
the community. Zope also offers clustering features like ZEO to scale 
further.

> Has anyone done a comparison with Django or Rails?

No, I don't think so, not for Grok or for Zope 3 itself. It would be 
interesting, but difficult, to do such comparisons, as there are so many 
possible things to compare and it's difficult to come up with a fair 
comparison.

One big difference between Zope 3/Grok and systems like Django and Rails 
is that Zope 3 typically (but not necessarily) uses the ZODB for storage 
of its content. Due to the nature of the ZODB means it's probably quite 
a bit faster to get to a Python object than it is to construct one in a 
relational object mapping system as used by Django and Rails; especially 
if an object is still in the ZODB's internal cache and can thus be 
directly loaded from main memory.

On the other hand, catalog queries may not always be as fast as 
relational queries, as relational engines have had a lot of query 
optimization work while the catalog has had far less. Then again, this 
all depends on the circumstances - there are certainly scenarios 
thinkable where catalog queries can actually be faster.

Anyway, catalog indexes perform well on many data sets in my experience. 
Queries are also less frequently necessary with an object database, as 
relationships can be expressed as direct object relationships in many cases.

> Besides that I think it's impressive what you achieved in just a view 
> months.

Thanks! The trick is of course is that we're standing on the shoulders 
of giants: Zope 3, which has been under development for years. Grok is a 
project to make it more approachable, and I'm happy to hear that you are 
impressed by what we've accomplished so far.

Thanks for trying out Grok and letting us know about some of your 
problems and questions. I hope my answers have been of use to you. 
Please keep giving us feedback!

Regards,

Martijn



More information about the Grok-dev mailing list