[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Y Store /Closures
Christopher Barber wrote
>What is the difference between a Web app vs other apps?
>
I am not entirely sure that I have been following all of this, since I
have never
written presentation-tier web apps stuff myself, but I presume that the
interesting issue here is the need for coroutining that comes up because of
the structure of the way HTTP interactions and web browsers work. Each
click on a browser button invokes a little subroutine, which runs and
returns
a result, which the user at the browser sees as the next page. But from the
point of view of writing the application, it is inconvenient (sometimes
to the
point of being utterly unacceptable) to have everything be "event-driven"
in this way. There is state to be maintained between one click and the
next, and you sometimes want that state to be expressed as "control state"
(i.e. in the "PC" and the "stack", to use the "vulgar" terms) rather than as
state stored away in variables or files or databases. Hence the interest
in continuations. (Correct me if I'm wrong.)
Now, here's what I want to know. Suppose you want to write a web
app that maintains state between clicks in the fashion I've been describing,
but you don't want all that state to be lost in case there is a reboot or
power failure or crash. In the event-driven style, the state can be stored
persistently, in a file or database system, so that when the next HTTP
request comes along, you can pick up where you left off, but in a
conventional
language-with-continuations scenario, the continuation state is all in
virtual
memory and lost when there's a crash. What can anyone recommend?