Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 17th, 2006, 09:10 AM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Concurrency issues

Hi all,
Interesting question, I work on academic software and has a question on concurrency issue. Students get registered in class through our online registration. If there is only one seat left in the class and two or more students try to register online at the same time then how would i deal with the concurrency issue. my options put them on waiting list in the database even then if 2 different students are on waiting list at the same time which student should get enrolled first to the course. other options are pooling(or threading) and other option is session objects. Please let me know the best possible solution in this case. I don't need any coding here but need to know how to find out way to do this.

Thanks,
Cindy Priya.


  #2 (permalink)  
Old October 17th, 2006, 10:21 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

well.. it's depend on how are you register the students... there is a moment when you assing the student a sit, in that moment (unless you have a multiprosesor unit) you will have one and only one thread running. that's the only student that get the sit.
If you have another model (something like: you have a sit, fill the data, assing the sit) then you will have probably a problem if the user didn't finish his registration.

we can discuss this all year ;) what model are you using???

HTH

Gonzalo
  #3 (permalink)  
Old October 18th, 2006, 11:16 AM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Gonzalo,
Thanks for looking into this Gonzalo, I'm not sure what you mean by "which model i'm using?" I don't have to fill in anything. Once user is in registration screen all they do is, select the available course and hit Register button in order to get enrolled into a course. Do you think i can use Optimistic or Pessmestic lock on the database in this regard, Let me know. Also I'm not sure about the models so let me know what kind of models are available.

Thanks
CindyPriya.

  #4 (permalink)  
Old October 18th, 2006, 11:42 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

by model i refer what type of architecture you will use in your aplication...

the way you plan to do this, looks like optimistic look will do the trick.. there could be a case that a student hit the submit button and receive and error that he cannot enroll in a class due to a submit at the same time in another site, so you will have to check for that error. Use transaction to avoid problems.

HTH

Gonzalo


Similar Threads
Thread Thread Starter Forum Replies Last Post
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
concurrency problems Dorean Visual Studio 2005 1 September 4th, 2007 10:38 AM
CONCURRENCY pallone SQL Server 2000 13 December 6th, 2006 12:01 PM
Concurrency problem sanjaymannnet ASP.NET 1.0 and 1.1 Professional 0 July 10th, 2006 05:42 AM
Concurrency dextertoh Classic ASP Databases 2 May 17th, 2004 12:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.