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

Oliver Oli oliver.oli at gmail.com
Wed May 9 08:30:36 EDT 2007


On 5/8/07, Martijn Faassen <faassen at startifact.com> wrote:
> 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):

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

I have tried the svn trunk. easy_install grokproject just works fine.
thanks for fixing it in svn, I will try to install it later (but I
believe it will work).

> 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?

I donwloaded the tarball from cheeseshop. If I remeber correctly I've
got the same error (with bootstrap / buildout).

> > 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.

I figured it out. It's the first time I'm using VirtualHostMonster. I
just didn't know where to look for a solution. url rewritting is the
thing I was looking for. I put the following line in the nginx
webserver config and it works just fine:

proxy_pass  http://127.0.0.1:8080/myapp/++vh++http:mydomain.com:80/++/;


> > 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 :)

I think what I'm missing is a reference. I know it's a lot of work and
it's always hard to find one who capable of doing it and can afford
the time to accomplish it. I'm going back to the tutorial, if I have
suggestion how to prove it I'll let you know :-).

Maybe we could put some documentation in a Wiki?

> > 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.

I did some smallish web application with web.py. It is really nice to
just write your code, save it and test it. Although there are cases
where it doesn't work with web.py and you have to restart the server
(and it doesn't work in web.py from svn trunk, maybe they have also
troubles with reloading portions of the code).

> > 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.

That is the answer I've hoped for. :-)

> 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.

I will try to setup a ZEO cluster with two instances. Do you know any
heavy traffic website that is built with Zope?

> > 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!

Thanks for the help! :-)


More information about the Grok-dev mailing list