473,385 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Temporary Use of Session Object

I'm currently developing a small MVC framework using classic ASP
(don't ask me why!) At it's core it calls the controller script which
does the heavy logic and builds disconnected recordsets of the
required data then transparently "includes" a page template asp script
using a Server.Execute.

Because of the limitations of Server.Execute and Server.Transfer the
data generated by the controller needs to be persisted past the
Server.Execute call by placing it into the Session Object. At the end
of each request everything placed into the Session object is removed
and the session is abandoned. Session.Timeout is also set to 1 at the
start of each request. I don't want or require anything to persist
past each request (contrary to the traditional role of session
variables) so this isn't a problem. I have a more robust database
session management system for this.

My question is, am I going to run into any scalability issues while
using the Session object in this way? I've heard whispers of thread
locking and heap fragmentation linked to storing large amounts of data
in Session, but I get the feeling this might only be so much of a
problem if the data is being persisted for the default 20 mins or
longer with each request.

Please feel free to shoot me down in flames here... or suggest an
alternative approach to persisting data through a Server.Execute/
Transfer

Oct 29 '07 #1
5 1983
wrote on 29 okt 2007 in microsoft.public.inetserver.asp.general:
Sorry i think you appear to have misunderstood my question. I'm not
sure if perhaps this is a language barrier thing, but i get the
distinct impression that you belive i am trying to suggest that
Classic ASP is not a serious development platform, This is not the
case
OK.

Did you mean the jscript vs vbscript language barrier?

;-)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 29 '07 #2
Thanks for the heads up on the batch file. I was planning on placing
the disconnected recordsets into the Session object and the thread-
binding is what was concerning me. I don't come from an ASP/VBScript
background.. or a Microsoft one at all for that matter so it's helpful
to get an insight into stuff like this. It's often difficult to find
advice on Classic ASP techniques and best practices as the community
isn't as large as it could or should be.

My application uses disconnected recordsets simply as arrays of data
with which to generate html. I could generate dictionary objects from
the recordsets but i believe these are apartment threaded also.

I agree about the Timeout and Abandon settings, these are both
unnecessary. I was thinking in terms of belt and braces garbage
collection, but i can see now that this was in error

Oct 29 '07 #3
"ja***********@googlemail.com" wrote:
I'm currently developing a small MVC framework using classic ASP
(don't ask me why!) At it's core it calls the controller script which
does the heavy logic and builds disconnected recordsets of the
required data then transparently "includes" a page template asp script
using a Server.Execute.

Because of the limitations of Server.Execute and Server.Transfer the
data generated by the controller needs to be persisted past the
Server.Execute call by placing it into the Session Object. At the end
of each request everything placed into the Session object is removed
and the session is abandoned. Session.Timeout is also set to 1 at the
start of each request. I don't want or require anything to persist
past each request (contrary to the traditional role of session
variables) so this isn't a problem. I have a more robust database
session management system for this.

My question is, am I going to run into any scalability issues while
using the Session object in this way? I've heard whispers of thread
locking and heap fragmentation linked to storing large amounts of data
in Session, but I get the feeling this might only be so much of a
problem if the data is being persisted for the default 20 mins or
longer with each request.

Please feel free to shoot me down in flames here... or suggest an
alternative approach to persisting data through a Server.Execute/
Transfer
To clear the contents of a session use Session.Contents.RemoveAll.

This is preferable than having the session timeout quickly (or deliberately
abandoning in the session with the abandon method). You should set the
session timeout to a reasonable period that your users will be running a
browser session that will be visiting your site.

Using session object to store variables isn't going to fragment memory
anymore than storing variables in any other way.

--
Anthony Jones - MVP ASP/ASP.NET

Oct 29 '07 #4
Did you mean the jscript vs vbscript language barrier?
heh, yeh

Oct 29 '07 #5
I'd like to say a big thankyou for the advice about using free-
threaded xml docs to store data. so simple yet so effective. i don't
know why i didn't think of this myself.

Oct 29 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Corrine | last post by:
Hi, I am creating a global temporary table that is session-specific. I insert a BLOB into this table, and then select the BLOB from this table into a ResultSet. The ResultSet sees this BLOB...
30
by: btober | last post by:
Whenever I create a temporary table, with something like CREATE TEMPORARY TABLE temptable1 AS SELECT * FROM paid.ad_hoc_query; New schemas appear, with names like "pg_temp_1". I guess the...
4
by: prasad | last post by:
I am getting sql error during binding a program which access a temporary table. The temporary table declaration and access methods are given below. EXEC SQL DECLARE GLOBAL TEMPORARY TABLE TEM88...
11
by: Hemant Shah | last post by:
Folks, I have a perl script that creates and uses global termporary table. This script worked fine with UDB 7.2 on AIX. Sometime ago I moved the database to UDB 8 on Linux. The select statement...
4
by: Philippe Meunier | last post by:
Hello, I've built a web application that ask the user for 3 values (textboxes) and when the user press a button (command button) the server genereates a report in a temporary html file My App...
2
by: David Parker | last post by:
In our application we have a table that tracks network sessions. The usage is: 1) create a session record 2) read/update the record several times during the session 3) delete the session record...
7
by: fintudet | last post by:
Hello. During some experimentation with DB2 decimal numbers representations, I have discovered very unexpected behaviour of the global temporary table. Consider this example. Such I had...
1
by: Kburton | last post by:
All, I am trying to declare a cursor on global temporary table. I declared the global temporary table first and then the cursor but I got the following error: 42601(-104) SQL0104N An...
2
by: stefan.albert | last post by:
Hello Ravi, what you want to do is very tricky, but possible. I've had this same problem - we want to identify the top user of tempspace and eventually force him off when using too much space (FS...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.