New topic: 

Multi-User Queries with Single Database Connection

<http://forums.realsoftware.com/viewtopic.php?t=47264>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        xbww          Post subject: Multi-User Queries with Single 
Database ConnectionPosted: Mon Mar 11, 2013 6:08 pm                         
Joined: Wed Oct 12, 2005 5:30 pm
Posts: 109
Location: Bryan, Texas                We've got a web app with multiple users, 
like 20-50 simultaneously. We have to lookup an id in a specific table on an MS 
SQL Server. It is a single lookup when the user logs in and then no connection 
is required to the database server. There are lots of other things happening 
when the user logs in and we are trying to cut down the time it takes. Rather 
than establishing a connection to the MS SQL Server every time a new user 
connects (within the session object), we would prefer to query the database 
server with an existing connection, wishfully a single web app connection on 
the App object. Since each session is actually a thread (right?), our 
assumption is that utilizing a single db connection could cause an issue, even 
if we are just reading and not writing. Is this correct?  We read up on 
CriticalSection and this seems to be the solution. Does anybody have any 
insight on how to best implement it, if that is the solution to our problem?  
We assume it would need to be a property of the app class but what is the 
procedure to create an instance and use it with sessions?

Another related question.... We are building a dictionary when the web app 
loads as a property of the app class. If we look up values (never modifying) 
with sessions, is there any risk of problems with multiple sessions "reading" 
only the dictionary concurrently?   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to