Re: Converting Program for Use on the Web?

From: Maarten Wiltink (maarten_at_kittensandcats.net)
Date: 02/19/04


Date: Thu, 19 Feb 2004 20:51:40 +0100


"Bob" <ttsupprt@pacbell.net> wrote in message
news:0I7Zb.14830$ur.523@newssvr29.news.prodigy.com...
[...]
> - What is "stateless" or the implication of stateless?

On a desktop, your program runs, and users interact with it, and the
program keeps running. The whole time. It can remember what it was
doing, and expand on that with every new interaction.

On the Web, a user navigates to a page, and the server returns one,
and every page is a universe of its own. The user, who is a human,
may see a logical sequence of pages, but there is only a disconnected
series of HTTP requests and HTTP replies. I can make a bookmark
halfway, and come back next week, starting where you thought was
halfway something. But there is no halfway. There is only an HTTP
request, and you have to serve up a page that makes sense.

Taking a slight (ahem) step back for a moment, a "class" can be
though of as a record type containing code and data. The code makes
the "behaviour" of the instance, and the data the "state". Creating
an instance starts it in some initial state, methods cause
"transitions" from one state to the next, and with a series of
method calls, interesting things (to the user) happen. You may be
playing a game of Tic-Tac-Toe: the data in the game object records
the "state" of the board, and players make moves that change the
state, until the game ends.

Now ask the Web version of that same game for a page. How does it
know what moves have already been made, or put another way, what
it its "state"? I'm just asking for a web page.

A common model for applications to integrate into web servers is to
start a new copy to handle any request determined to have been made to
that application, and let it handle exactly one request. No "state" is
kept, and this makes life hard on the application programmer. One way
out is to put the burden on the web server, and keep a plug-in running
for several connected requests in a row, and effectively change its
model back to the desktop view of an application. The problem is that
now the web server has to determine what constitutes a "connection".

Other ways include cookies on the client, framesets that keep one frame
constant so variables can be set in it, and encoding name-value pairs
in URLs. The idea of the last technique is to pass along all required
state on any hyperlink out of the page, so the next page still has it.

A Web interface is an entirely different beast from a window interface,
and "state" is what makes the difference. To the best of my knowledge,
the problem has not yet been acceptably solved. Perhaps trying is a
mistake.

Groetjes,
Maarten Wiltink



Relevant Pages

  • Re: Application pool terminated unexpectedly
    ... Things that can be responding to the request include: ... pool 'DefaultAppPool' terminated unexpectedly. ... We have always used Nessus for this. ... condition where almost every scan I run against the rebuilt web server ...
    (microsoft.public.inetserver.iis)
  • Re: The server committed a protocol violation
    ... Response -> ... instead sending a new request right away. ... One potential gotcha here is that the web server does one sendfor ... application can access the web service without any problems. ...
    (microsoft.public.windowsce.embedded)
  • Re: Dundee get refused
    ... Club today requested permission to postpone the game against Hearts. ... Celtic waited till Monday to request the postponement, ...
    (uk.sport.football.clubs.rangers)
  • Re: Dundee get refused
    ... we have been advised that the game must go ... Hearts are bigger ... Celtic waited till Monday to request the postponement, ... You are so full of bile that it seems reasonable to you that a club ...
    (uk.sport.football.clubs.rangers)
  • Re: proxy server in lisp
    ... ??>> almost all garbage collectors do full GC from time to time, ... if we'd like to test web server workloads, let's do a benchmarking of UCW. ... 100% 11754 (longest request) ... ??>> pauses) implemented for Common Lisp. ...
    (comp.lang.lisp)