[Seaside] Backtracking/filestream questions

Avi Bryant avi at beta4.com
Mon Mar 15 04:57:29 CET 2004


On Mar 13, 2004, at 11:00 PM, Colin Curtin wrote:

> 1) I have written a Seaside proxy in which you enter a URL for a 
> webpage you
> would like to view, and it displays it below the title bar. Its 
> functionality
> is similar to Anonymizer or Guardster. The problem is that I have code 
> which
> looks like:
>
> document _ aUrl retrieveContents contents
>
> #retrieveContents has to perform a namelookup on the URL, which 
> requires a
> semaphore'd shared resource. Since (for some odd reason) I've allowed 
> this app
> to use backtracking, the state is saved for the session time (5min I 
> think),
> therefore I can only look at about ten pages until I've used up all of 
> the
> namelookups.

I'm having trouble following you.  What does "used up all the 
namelookups" mean?  What specifically do you mean by "allowed this app 
to use backtracking"?  And how are they related?

> I read through this list today and found something that will probably 
> work
> perfectly: just displaying a "main bar", and then having a method that 
> renders
> content for me, without registering for backtracking. Will this solve 
> the
> session/semaphore problem?

Seems unlikely, but it's hard to know without more detail.

> Is there a elegant way to attach a filestream to the outgoing 
> httpstream?

Not right now.  Seaside buffers the entire response, so you're probably 
actually getting each file in memory twice.  I'd like to change this, 
but AFAIK there isn't a good way in Comanche to get a direct stream 
interface to the socket.  I've played with using the SharedStreams 
package on SqueakMap to hack one together and it can be made to work, 
but I haven't had time to do it properly yet and submit the patches to 
Stephen, etc.  Even with that, however, there's some work at the 
Seaside layer to make this easy to use.

Sorry I don't have better news for you...



More information about the Seaside mailing list