[Seaside] What is the reason for a page to expire?

Markus Fritsche Fritsche.Markus at gmx.net
Sat Aug 30 22:03:57 CEST 2003


Avi Bryant wrote:

>>Hmm, I've change the paths of the applications from /seaside to
>>/~mfritsche/echo.php and the basepath by hand - I should start with a
>>fresh image :-)
>>    
>>
>Ok, I'm sure this is where the problem lies.  If you're getting to "page
>expired", then it must be finding the session ok, but the last segment
>(the action key) of the URL must be wrong.  Try tracing through
>Session>>handleRequest: (I think that's the right method) and see what
>happens.
>
>Feel free to send me the code if you want and I'll try to take a look at
>it.
>
I found it: I had to translate the fields dictionary keys to string. Now 
it works. I also built an own dispatcher, overiding 
WADispatcher>>#initialize.

>>The thing is an experiment; I want to start a minimal image, let it run,
>>and then it shut down after two minutes of inactivity.
>>    
>>
>
>That's an interesting approach.  Do you save the image when you shut it
>down, I guess?  Does the PHP script start the image up for you if needed?
>
Yes, I basically, I had the following idea:
1. The browser is pointed to .../echo.php/seaside/paths
2. The php-script tries to establish communication to localhost:19995
2.1.1. if not successful start the vm
2.1.2. wait (1, 2 seconds)
2.1.3 retry localhost:19995, start communication
3. set a timer of say, two or three minutes. Reset on activity. If the 
timer says that it's time to sleep, save the image.
A problem is the race condition on image saving. Maybe lockfiles would 
do the trick?

I've done the same with GNU Smalltalk; it was a bit tricky 'cause the 
GNU Smalltalk vm crashes if the image isn't saved from the main process 
(Processor gets messed up). I don't know if it is the same in squeak?

Regards, Markus



More information about the Seaside mailing list