Here is what I have done to implement the Site Shutdown use case.

Create an application level status variable, called runStatus, with a
default value of 'started'.

Create a page where the application admin user can initiate the shutdown
process. Enter the number X of minutes before shutdown. RunStatus is set to
'shutting down'. A timer is started which will run the shutdown process in X
minutes (whatever the admin entered as a value).

New Sessions:
When RunStatus != 'started', all login attempts are automatically redirected
to an information page.

Current Sessions:
If RunStatus = 'started', do normal action.
If RunStatus = 'shutting down', display a 'System shutting down in X
minutes' message before doing the normal action.
If RunStatus = 'stopped', send user to information page and kill session.

Shutdown Process:
After X minutes, set RunStatus = 'stopped'. Then do whatever needs doing,
like closing database connection pool, notifying admin user, etc.

Wiebe de Jong


-----Original Message-----
From: Dean A. Hoover [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 10:26 AM
To: [EMAIL PROTECTED]
Subject: site "shutdown" best practice?

I have a website I'm working on that is
fairly typical (I think): there areoperations that
anyone can do and operations that require
a user to be logged in. Authorization and
authentication are done using a database.
 From time to time, the site needs to be
shutdown for general maintenance, upgrades,
etc.

I want to give the users fair warning that the
site will be shut down at such and such a
time. I also want to prevent the users from
performing operations during this "shutdown".
I think it would be good if there were still
a home page up, with indications that the
system is offline and should be back by a certain
time. At first I thought I would create some
table in my database to control some of this
but I think this is not such a great idea, as the
reason for taking the site down may be to do
something radical to the database.

Is there some "best practice" for accomplishing
this?

Thanks.
Dean Hoover

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to