[Zope-dev] Zope does dynamic, Linux kernel does static pages?

Jim Fulton jim@digicool.com
Thu, 10 Jun 1999 17:31:23 +0000


"Ross J. Reedstrom" wrote:
> 
> Hey Zopesters -
> Just thought I'd point out something thart came up on the linux kernel
> mailing list this week. Apparently, as part of the aftermath of that
> whole Mindcraft 'benchmark' fiasco, it came to the kernel developers'
> attention that under NT, IIS has special status - it has some sneaky
> system calls that end up with the NT kernel effectively doing all the
> serving of static HTML pages. This had been discussed some time ago as
> an interesting idea under Linux, but this time around, someone started
> implementing it. It's still alpha, but it's at:
> 
> http://www.fenrus.demon.nl
> 
> This being Linux, it's not specific to any one HTTP server, it'll
> cooperate with anything that listens on a port. Basically, it'll handle
> serving the simple static pages directly from the filesystem as fast as
> possible, and pass anything else on to the userland application.
> 
> Linus Torvalds himself seems to like the idea, and mentioned:
> 
>  So you could even use a pretty much unmodified apache (or other) web
>  server to do all the non-static cases - although it would probably imply
>  that the user-level deamon would be better off being optimized for the
>  "uncommon" case because it never sees the common case.
> 
> Hmm, a user-level deamon optimized for the "uncommon" non-static case:
> do I hear Zserver calling?
> 
> Admittedly, it's still alpha, but anyone playing with Zope2 on linux
> might want to look at this. To use it effectively, you'd need to use
> absolute URLS to static pages (and images) outside the zope ORB, so the
> module can find them.
> 
> In the long run, some sort of static 'shadow' directory structure,
> perhaps managed via one of the new ORB3 alternative storage managers,
> could allow the Zope developer to mark objects as 'static pages' that
> get pushed out to files, so the kernel daemon could see them.  Hmm,
> this might even allow Zope's cache to become accessible to the kernel
> deamon? Does Zope do any caching of rendered of pages? If it did, That'd
> be a speed win for 'quasi-static' things that change slowly compared
> to typical user sessions. In fact, the caching would be a win no matter
> how you serve pages.

This sounds interesting. One idea I had that would fit with this
was to introduce some caching in ZServer.  Certain objects, especially
images and files might get cached by ZServer, so that it can avoid calls
to the object system when they are requested.  Presumably, the ZServer cache
could then play with this Linux kernal thing.  ZServer may manage it's
cache using standard HTTP headers, or it might do something more Zope
specific, that perhaps uses knowledge of the way the object system works.

If someone wanted a really easy place to start, one might add a 
cache to ZServer that always cached URL paths's beginning with 
"p_" or "misc_", since these point to static images (and 
possibly other resources) defined at the Python level.

Jim


--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.