<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.14">
<TITLE>Re: [Seaside] Seaside cache</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Back to original question for a second. I can't help but wonder how would you rely on front webserver caching your pages when they have information specific to the user anyway. Most likely somewhere you have login/logout button that depends on specific session state and users name included somewhere on the page, nevermind user-specific content like their favourite destinations list etc. I just can't imagine a hotel description page that is completely separated from all of that. And if it is, how about saving it to disk and letting front web server do its magic then?<BR>
<BR>
Cheers!<BR>
<BR>
-Boris<BR>
(Sent from a BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org &lt;seaside-bounces@lists.squeakfoundation.org&gt;<BR>
To: 'The Squeak Enterprise Aubergines Server - general discussion.' &lt;seaside@lists.squeakfoundation.org&gt;<BR>
Sent: Wed Feb 28 07:41:02 2007<BR>
Subject: RE: [Seaside] Seaside cache<BR>
<BR>
&gt; Hello Ramón,<BR>
&gt; May be I did not express myself properly.<BR>
&gt; By no means I talked about a static web site on my post.&nbsp; I<BR>
&gt; talk about caching a dynamic web site which is enormously<BR>
&gt; different.&nbsp; Most dynamic web sites can benefit enormously<BR>
&gt; from this, including yours. I disagree about Seaside being<BR>
&gt; designed for &quot;higly dynamical&quot; web sites only; where would<BR>
&gt; you put the threshold that divides regular dynamic web sites<BR>
&gt; from &quot;highly dynamic&quot; web sites.&nbsp; I think there is no use in<BR>
&gt; making this categorization.<BR>
&gt; Not to talk about hypothetical web sites, let's talk about<BR>
&gt; your real neat travel reservation web site (which I think<BR>
&gt; it's the coolest Seaside app I've seen so far with DabbleDB),<BR>
&gt;&nbsp; Is it &quot;highly dynamic&quot;?.<BR>
&gt;&nbsp; Don't you have for instance, a catalog of hotels? Imagine<BR>
&gt; your web site becomes real popular on the next soccer world<BR>
&gt; cup and you have 50 requests per second quering about a<BR>
&gt; specific hotel on a specific town.<BR>
&gt;&nbsp; I don't think hotel information changes really often,<BR>
&gt; nevertheless, you still have to generate it dynamically for<BR>
&gt; each of those 50 requests per second you are serving.<BR>
&gt; Imagine you could dynamically generate the page for the hotel<BR>
&gt; only when the underlying object model changed, and all the<BR>
&gt; time in between the page is served from a cache, at lightning<BR>
&gt; speed and in comparison without consuming almost any<BR>
&gt; resources.&nbsp; Wouldn't that produce a MUCH MUCH better use of<BR>
&gt; your servers? You could probably handle an order of magnitude<BR>
&gt; or more traffic, and you would not lose anything of your<BR>
&gt; dynamic functionality.&nbsp; Just like in all the other frameworks.<BR>
&gt; So no, I'm not talking about static web sites, nor &quot;less<BR>
&gt; dynamic&quot; web sites than what Seaside was designed for.<BR>
&gt;<BR>
&gt; I also think that one of the biggest problems in my beloved<BR>
&gt; Squeak community is looking the other way when someone points<BR>
&gt; to a problem.<BR>
&gt; I've seen so many pragmatic and clear problems dragged to a<BR>
&gt; philosophical ground of discussion about &quot;what is really<BR>
&gt; good&quot;, where any opinion can be relativizied and then<BR>
&gt; dismissed.&nbsp; For instance, when a new guy comes and says that<BR>
&gt; Squeak user interface is outdated; poor dude, then come the<BR>
&gt; philosophical threads about &quot;what is real good&quot;. Who can dare<BR>
&gt; to say that holds the truth? And the problem is annihilated.<BR>
&gt; Se we should learn to acknowledge the problems, not to look<BR>
&gt; the other way with articulated rethoric.<BR>
&gt; I believe the problem I am pointing out about Seaside's<BR>
&gt; inability to be proxifyed, is a MAJOR problem, it really<BR>
&gt; sucks. It makes Seaside applications consume a lot more<BR>
&gt; resources than they should also and be a lot harder to<BR>
&gt; administrate on a high traffic web site.<BR>
&gt; I HOPE I AM WRONG, since I really love Seaside.<BR>
<BR>
I'm not disagreeing that the ability to cache the site wouldn't be nice.<BR>
Certainly it would, but it's a very complicated issue because Seaside relies<BR>
so heavily on Sessions to enable all the magic that makes working in it so<BR>
great.<BR>
<BR>
Those pages have so many Ajax callbacks in them that assume there is state<BR>
sitting on the server waiting to answer them.&nbsp; Were a page somehow served<BR>
from a cache, the server side session would eventually expire, the state<BR>
would disappear, and the cached page would no longer work.&nbsp; The cache is<BR>
also user specific, so without some kind of major core rewrite of the one<BR>
thing that makes Seaside different, and a joy to work with, Sessions, I just<BR>
don't see how such a page can be cached.<BR>
<BR>
I do have caching in the site, but I do it at the db call level, rather than<BR>
at the page level.&nbsp; To make a cache work, you'd have to make the calls<BR>
stateless, encoding the necessary state information into the URL directly<BR>
and re-fetching the objects per request, and running stateless with data<BR>
encoded into the URL is everything Seaside tries to avoid.<BR>
<BR>
I could be totally wrong, maybe someone smarter than me will come along and<BR>
see an elegant way to do it without losing that Seaside feel, but I just<BR>
don't see how it'd work.&nbsp; Of course, I'd not complain at all if someone<BR>
figured out how to do it. ;)&nbsp;<BR>
<BR>
At the moment, my time costs far more than web servers do, so I'm happy to<BR>
throw hardware at the problem to make it scale and serve up everything<BR>
dynamically.&nbsp; As far as I'm concerned, it's a small price to pay for the joy<BR>
of programming in Seaside.<BR>
<BR>
I would of course, love to see a deeper discussion on the subject by those<BR>
more knowledgeable than me.<BR>
<BR>
Ramon Leon<BR>
<A HREF="http://onsmalltalk.com">http://onsmalltalk.com</A>&nbsp;<BR>
<BR>
_______________________________________________<BR>
Seaside mailing list<BR>
Seaside@lists.squeakfoundation.org<BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
</FONT>
</P>

</BODY>
</HTML>