Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2001 11:55:07 -0400 (EDT)
From:      David Scheidt <rufus@brain.mics.net>
To:        Greg Pavelcak <gpav@som.umass.edu>
Cc:        freebsd-chat@freebsd.org
Subject:   Re: Making Appointments By Computer
Message-ID:  <Pine.BSI.4.20.0110161146001.4441-100000@brain.mics.net>
In-Reply-To: <Pine.OSF.4.10.10110151416130.10027-100000@lessing.oit.umass.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Oct 2001, Greg Pavelcak wrote:

> Hello all,
> 
> I'm posting to chat because this is not particularly FreeBSD related. 
> I was just hoping to dip into the knowledge pool here.
> 
> I work in an undergraduate advising office. We want to handle
> freshmen advising in groups of 10 and let them sign up for the times 
> themselves. Our first thought was to make a web page, add a form, and 
> have it count down from 10, letting the students know how many spaces 
> were available at each time, or, at the very least, stopping the 
> sign-ups when the limit was reached. I have found many counter
> scripts on-line, but I am not in charge of our web-server, and
> although I'm running FreeBSD 4.3, I don't think I can learn Apache in 
> the next couple days and get a web-server running (or can I?).
> 
> My other thought was to create a freshmen login account on my
> computer that basically does nothing other than run a script that 
> gives them info on available times and allows them to sign up,
> but I'm worried about the accuracy of the information if several
> people log in to make appointments simultaneously.

To do this right, you really need a database, which can handle the locking 
and multiple access problems for you.  Basically, show the user the
available slots, have them pick on, grab a lock, update the database.  If
you can't do the update (because someone else signed up for the last spot 
between the check, and your udate attempt), tell teh user "sorry", pick
another.   The same approach works whether you're web or terminal based.  
(If the amount of use isn't very high, you can futz with flat files and 
lockfiles, but that's a pain.)

David


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.4.20.0110161146001.4441-100000>