Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Looking for best way to reduce connections on a web server
Thu, Nov 19 2009 6:12 PMPermanent Link

Brent Samsom
I'm writing a web server that has editable database grids & forms and want to reduce the
stress on the DBISAM engine. For testing purposes I'm using the embedded engine and maybe
later I'll use C/S if I need more performance.

I've been thinking that when I pull the data into the web form for the user to edit, I
should pull it into a memory dataset like TkbmMemTable and have the user edit this memory
table. When the user saves the form I'll write the changes back to the dbIsam table. That
way the connection is only open for a fraction of second to read the data again to write
the changes.

Is this how most people handle it?

TIA
Brent
Fri, Nov 20 2009 2:41 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Brent,

<< I've been thinking that when I pull the data into the web form for the
user to edit, I should pull it into a memory dataset like TkbmMemTable and
have the user edit this memory table. When the user saves the form I'll
write the changes back to the dbIsam table. That way the connection is only
open for a fraction of second to read the data again to write the changes.
>>

I wouldn't even worry about that unless you've got a very large number of
expected concurrent hits on the web server (> 1000).  The sessions in DBISAM
are very lightweight, so keeping a session open is not a major amount of
overhead.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Nov 22 2009 1:11 PMPermanent Link

Brent Samsom
"Tim Young [Elevate Software]" wrote:

Brent,

<< I've been thinking that when I pull the data into the web form for the
user to edit, I should pull it into a memory dataset like TkbmMemTable and
have the user edit this memory table. When the user saves the form I'll
write the changes back to the dbIsam table. That way the connection is only
open for a fraction of second to read the data again to write the changes.
>>

<I wouldn't even worry about that unless you've got a very large number of
expected concurrent hits on the web server (> 1000).  The sessions in DBISAM
are very lightweight, so keeping a session open is not a major amount of
overhead.>

Is this is true of the non-C/S and C/S versions of DBISAM?

The problem with a webserver is that the session times out in 20 minutes so that would
1000 connections in 20 minutes even if they hit the page just once and then leave. I
thought it would be more efficient if I just execute the query in 1/2 second and transport
the data to a local memory table like kbmMemTable and close the query connection. That way
the user session can sit there without being a drag on the database. If opening and
closing the connection takes too long, then I can disconnect the connection if there is no
activity after 1 minute instead of right away. What do you think?

Brent
Sun, Nov 22 2009 9:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Brent,

<< Is this is true of the non-C/S and C/S versions of DBISAM? >>

Sure, because what you're going to do is basically:

1) Connect a session
2) Execute some database operations
3) Disconnect the session

If connection overhead becomes an issue, then you can use session/data
module pooling to alleviate this.  However, you should not have an issue if
you use the local DBISAM engine directly and compile it right into the web
server.  That's what we do with our web server here at Elevate Software.
Each web request opens up the session, databases, tables, etc. and then
closes them when it's done.  You won't even notice this going on in terms of
performance.  Try it with our home page on the web site, which is completely
dynamic.

There really is not benefit to using the DBISAM Database Server in such a
case, especially if the data is local to the web server.

<< The problem with a webserver is that the session times out in 20 minutes
>>

Which session are you talking about here - the DBISAM session ?

<< so that would 1000 connections in 20 minutes even if they hit the page
just once and then leave. I thought it would be more efficient if I just
execute the query in 1/2 second and transport the data to a local memory
table like kbmMemTable and close the query connection. That way the user
session can sit there without being a drag on the database. If opening and
closing the connection takes too long, then I can disconnect the connection
if there is no activity after 1 minute instead of right away. What do you
think? >>

See above. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image