im replying to myself but an even more efficient method would be to remove the expired reservations when a user is trying to make reservations ONLY WHEN there are not enough free slots open. This would make lots less CPU load for you since you said the majority of your classes never even have problems filling up.
----- Original Message ----- From: "Atrix Wolfe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 30, 2002 5:42 PM Subject: Re: Witango-Talk: Courses Full-Almost there > you dont need cron...the only time you really care that the reservations > expired are when you want to know how many open slots there are. So what > you do is whenever you want to know how many slots are open (such as when > someone logs in to make their own reservations) it is at that point that you > remove all expired reservations. > > With Cron you can have something execute every 10 minutes...even when you > have days of inactivity. > > -OR- > > before you need to calculate how many slots are open, you can remove all > expired reservations. > > i dunno about you but the second one sounds alot more attractive to me (: > > ----- Original Message ----- > From: "Dan Stein" <[EMAIL PROTECTED]> > To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]> > Sent: Monday, December 30, 2002 4:46 PM > Subject: Re: Witango-Talk: Courses Full-Almost there > > > > OK I have gone some of the way just need to deal with the 10 minute > expiring > > issue. > > > > I reworked things so a timestamp is in the basket table for each entry. I > > also increment the count and the open_closed when someone just pick a > course > > instead of waiting till they pay for it. > > > > If they remove the course from the basket it decrease the count and opens > > the course so that works well. > > > > The only think I still can't see my way clear too is dealing with the > > deleting of the line item in the basket and the reversing of the count if > 10 > > minutes goes buy. > > > > I can't do it from the user's session because if it they just close the > > browser no way to keep checking. > > > > Do I have to run a taf every ten minutes that checks to see if timestamps > in > > the basket where paid is 0 ( not paid for yet) and timestamp is greater > than > > 10 minutes past current timestamp? > > > > If so do I guess I have to use a cron to do that and do they work the same > > in 5.0 as 4.5 and are they reliable? > > > > Dan > > -- > > Dan Stein > > Digital Software Solutions > > 799 Evergreen Circle > > Telford PA 18969 > > Land: 215-799-0192 > > Mobile: 610-256-2843 > > Fax 413-410-9682 > > FMP, WiTango, EDI,SQL 2000 > > [EMAIL PROTECTED] > > www.dss-db.com > > > > > > > From: "Tom Ferguson" <[EMAIL PROTECTED]> > > > Reply-To: [EMAIL PROTECTED] > > > Date: Mon, 30 Dec 2002 16:43:17 -0500 > > > To: Multiple recipients of list witango-talk <[EMAIL PROTECTED]> > > > Subject: RE: Witango-Talk: Courses Full? > > > > > > try this: > > > > > > when they put the class in the shopping cart add a row to a table with > their > > > shopping cart ID for each course they purchased. put a timestamp in > this > > > table. Tell them they have 10 minutes (or whatever time you choose) > > > > > > when the number of rows in this table = number of slots available in > class, > > > set a message that no classes are available, check back... blah, blah > > > > > > When the person checks out, check this table and if their row(s) are > still > > > there, let them purchase, otherwise tell them that they waited too long. > > > When they check out, delete their row in the table and AT THAT TIME, > reduce > > > your inventory by however many they bought. > > > > > > every 10 minutes, run through your table, elimininating the expired > rows. > > > > > >> -----Original Message----- > > >> From: [EMAIL PROTECTED] > > >> [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Stein > > >> Sent: Monday, December 30, 2002 4:18 PM > > >> To: Multiple recipients of list witango-talk > > >> Subject: Re: Witango-Talk: Courses Full? > > >> > > >> > > >> How do I set that timer for 10 minutes. > > >> > > >> So I would have to change my course count when they sign up the kids > then > > >> start some sort of timer and if it expires then I have to reset the > count > > >> and delete the courses from the basket? > > >> > > >> > > >> -- > > >> Dan Stein > > >> Digital Software Solutions > > >> 799 Evergreen Circle > > >> Telford PA 18969 > > >> Land: 215-799-0192 > > >> Mobile: 610-256-2843 > > >> Fax 413-410-9682 > > >> FMP, WiTango, EDI,SQL 2000 > > >> [EMAIL PROTECTED] > > >> www.dss-db.com > > >> > > >> > > >>> From: "Ian Daniel" <[EMAIL PROTECTED]> > > >>> Reply-To: [EMAIL PROTECTED] > > >>> Date: Mon, 30 Dec 2002 11:48:51 -0800 > > >>> To: Multiple recipients of list witango-talk > <[EMAIL PROTECTED]> > > >>> Subject: RE: Witango-Talk: Courses Full? > > >>> > > >>> Do it the way the online ticket reservations systems work. > > >>> > > >>> That is, temporarily reserve the number of kids that she wants > > >> to sign up. > > >>> > > >>> So, the process goes like this: > > >>> > > >>> -- she logs on and checks to see if three spots for her three > > >> kids exist, or > > >>> one spot, etc. .. whatever the case may be. > > >>> -- she then confirms that she'd like three spots. Three spots are > > >>> immediately ... but only temporarily ... reserved for her; > > >>> -- she is then told in a bold font that she has ten minutes to > > >> complete her > > >>> transaction; > > >>> -- if she successfully completes and registers her kids, the spots are > > >>> permanently reserved for her family; > > >>> -- if not, then after ten minutes the spots are put back into the > > >>> "inventory" for anyone's use. > > >>> > > >>> Sites that book specific theater seats do the same thing. Your > specific > > >>> seat request is reserved temporarily while you complete the > transaction. > > >>> > > >>> Cheers, > > >>> Ian > > >>> > > >>> -----Original Message----- > > >>> From: [EMAIL PROTECTED] > > >>> [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Stein > > >>> Sent: Monday, December 30, 2002 11:36 AM > > >>> To: Multiple recipients of list witango-talk > > >>> Subject: Witango-Talk: Courses Full? > > >>> > > >>> > > >>> Looking for suggestions. > > >>> > > >>> I have a community school application that allows users to sign up for > > >>> courses on line. For 90% of the courses the max amount of classes is > not > > >>> critical. One or two over makes no difference. And class demand > > >> is not high. > > >>> > > >>> Therefore this system works fine. > > >>> > > >>> When a user selects a course it is put in their basket. > > >>> > > >>> When the pay for the course(s) the course count is increased by > > >> one and if > > >>> it is = or > course max then course is closed. > > >>> > > >>> But now we are adding these kids swim program courses. They > > >> are limited and > > >>> highly competitive to get in. Probably 150 people will sign up > > >> kids between > > >>> 8 and 10 AM the 1st day. > > >>> > > >>> My problem is how to keep the course count accurate when they > > >> sign up more > > >>> than one kid in their family. > > >>> > > >>> So here is the scenario. > > >>> > > >>> Mrs. Smith has 3 kids > > >>> > > >>> She logs into the site and goes to registration > > >>> > > >>> She gets a drop down list of her family members. > > >>> > > >>> She picks bill and swimming and puts course 1401 in her basket > > >> ( there is > > >>> room for 32 kids and bill makes number 32) > > >>> > > >>> She then goes to add Jill > > >>> > > >>> She selects the same course > > >>> > > >>> Without counting Bill it is still open but in reality if she > > >> were to pay for > > >>> Bills course now it would be closed. > > >>> > > >>> The system will think it is open and allow her to add Jill but > > >> now we are > > >>> one over. > > >>> > > >>> > > >>> The other issue is with so many people signing up at once while > > >> a course is > > >>> open when you 1st sign up by the time you get to the checkout > > >> it might be > > >>> closed. > > >>> > > >>> I can deal with this last one I guess by checking the course count > again > > >>> before checkout and if the course is now closed show them that > > >> and wait list > > >>> them removing the charge. > > >>> > > >>> Any other thoughts on how to handle this? > > >>> > > >>> > > >>> -- > > >>> Dan Stein > > >>> Digital Software Solutions > > >>> 799 Evergreen Circle > > >>> Telford PA 18969 > > >>> Land: 215-799-0192 > > >>> Mobile: 610-256-2843 > > >>> Fax 413-410-9682 > > >>> FMP, WiTango, EDI,SQL 2000 > > >>> [EMAIL PROTECTED] > > >>> www.dss-db.com > > >>> > > >>> > > >>> > ________________________________________________________________________ > > >>> TO UNSUBSCRIBE: send a plain text/US ASCII email to > [EMAIL PROTECTED] > > >>> with unsubscribe witango-talk in the message body > > >>> > > >>> > ________________________________________________________________________ > > >>> TO UNSUBSCRIBE: send a plain text/US ASCII email to > [EMAIL PROTECTED] > > >>> with unsubscribe witango-talk in the message body > > >>> > > >> > > >> > ________________________________________________________________________ > > >> TO UNSUBSCRIBE: send a plain text/US ASCII email to > [EMAIL PROTECTED] > > >> with unsubscribe witango-talk in the message body > > > > > > ________________________________________________________________________ > > > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > > > with unsubscribe witango-talk in the message body > > > > > > > ________________________________________________________________________ > > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > > with unsubscribe witango-talk in the message body > ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body
