Re: concurrency for asp.net
From: i9arcanes (i9arcanes_at_discussions.microsoft.com)
Date: 02/03/05
- Next message: Brian Basquille: "Re: Newbie: Getting a Zero-Length string error?!"
- Previous message: Shawn H. Mesiatowsky: "Re: log errors"
- In reply to: Kevin Spencer: "Re: concurrency for asp.net"
- Next in thread: angus: "Re: concurrency for asp.net"
- Reply: angus: "Re: concurrency for asp.net"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Feb 2005 15:03:03 -0800
One would not prefere to get locked until others decision.. It will be very
irritating for other customer if he has to wait for someone else to make
decision. and even someone can block the reservation for a long time...
What i would suggest is, to check the available flag each time you update
the record and you can through message if meanwhile someone has already
booked that seat.
"Kevin Spencer" wrote:
> I think you'll have to keep track of any customer considering a booking, and
> disallow any other customer from trying to check the same booking until the
> first has made a decision one way or the other. You could do this with
> Application-level variables.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Neither a follower nor a lender be.
>
> "angus" <angus@angus.com> wrote in message
> news:OZxouOhCFHA.3592@TK2MSFTNGP09.phx.gbl...
> > Hi all,
> >
> > I would like to seek help on the topic about concurrency in asp.net web
> > application
> > for instance, my application is going to implement a online restaurant
> > table booking system
> >
> > i have a db table to store all tables in the restaurant, lets call it
> > res_table
> >
> > in res_table, there is a table_id field, as well as a flag called
> > is_available, if the table has been booked, is_available=0, otherwise,
> > is_available=1.
> >
> > normally, when a customer is going to book a table, i have to validate if
> > the table is_available=1. right?
> >
> > now, there are two customers are going to book the same table almost the
> > same time,
> >
> > the timeline would be as follow:
> >
> > customer a -> check if < res_table xxx > is_available=1
> > customer b -> check if < res_table xxx > is_available=1
> > customer a -> book table xxx
> > customer b -> book table xxx
> >
> > so, the data is wrong.
> >
> > how to solve the problem? any good article is talking about that issue?
> >
> > Thank you.
> >
> > Regards,
> > Angus
> >
>
>
>
- Next message: Brian Basquille: "Re: Newbie: Getting a Zero-Length string error?!"
- Previous message: Shawn H. Mesiatowsky: "Re: log errors"
- In reply to: Kevin Spencer: "Re: concurrency for asp.net"
- Next in thread: angus: "Re: concurrency for asp.net"
- Reply: angus: "Re: concurrency for asp.net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|