Last post May 04, 2011 06:06 AM by KumarHarsh
May 03, 2011 03:28 AM|ShwetaC|LINK
I'm working on a web application that will be a hosted, multi-user solution when it is finished. I'm trying to figure out the best way to handle the database design for my app. Specifically, I need to figure out how to handle multiple, separate accounts.
Actually I have a web application(ASP.NET using C#) in which one of the webpages contains a "Compute" button.
1) Compute button click :On its click a C#.net exe is called. In the /bin/debug/ folder which contaions exe too; 2 more folders named Input, Output exist.
2) EXE Exxecution Process : Whenever exe is called, it takes a file from Input folder, performs some calculations and generates some files as a resultset. Those generated files(.txt or .xls or .csv) are stored
in output folder. Exe execution ends.
3) Further procees of Compute button click : compute button finishes its exe calling part and exe execution ends genrating results in output folder. Further, the data is read from result files present in ..bin/Debug/Output
folder and stored into the Database tables.
Now, since this is a multi-user web application, this process can be followed by multiple user at the same time. So, please help me to understnad and implement this multiple-user feature ?
My-view on the problem discussed above : whenever a user registers to the website through registration form, a folder with his unique username will be created under path ../bin/Debug/
Under this folder Input and Output Folders will be created i.e. now path for accessing Input Folder will be ..bin/Debug/username/Input instead of ..bin/Debug/Input. ll'ly for Output Folder.
I] But then my problem is; when user say 'A' logs in, clicks on compute button; how in C#.net exe, can i get the current session username so that I can access that username folder and take the Input file from that (currently logged in) user's Input Folder
and store resultant files in Output Folder ?? And what if other user say 'B' logs in at the same time or in the middle of the process of user 'A' , then how is it pssible to recognize that current username session holds 'A'; because now it will hold 'B' now
and then exe will read input from path ..bin/Debug/B/Input instead of ..bin/Debug/A/Input. So. how to handle this ?
II] when user say 'A' logs in, clicks on compute button, C#.net exe gets executed by reading file from correct path ..bin/Debug/A/Input and stores result files in ..bin/Debug/A/Output. Also, user 'B' logs in and follows the same procedure. After this data
is to be read from output files and stored into the Database tables. Now both users are active, they have accessed the web application, so how to handle multiple access to database tables at the same time. Is it possible thr' Database Locks, if yes how it
should be applied ?
Please do let me know if any other solution is available.
: I am using MYSQL
in the backend.
Thanks in Advance,
May 03, 2011 04:14 AM|wilfred.nyan|LINK
I think you should read or learn how to use session variables and session ID's
check this link
May 04, 2011 06:06 AM|KumarHarsh|LINK
In front end part,is everything running fine ?
Wht is the voloume of conncurrent user ?
Exactly, wht is happening between front end and back end ?which method are you following ?