Session and Application varibles

Results 1 to 5 of 5

Thread: Session and Application varibles

  1. #1
    Join Date
    Dec 1969
    Posts
    511

    Default Session and Application varibles

    This seems to be a bit of a grey area so I&#039d love a bit of guidance.<BR><BR>Ignoring the fact that none cookie-capable user would not be able to us my site, would it be ok to.<BR><BR>Store an array of size 100 which holds a maximum of 300 characters per slot (therefore total of 30,000) in an application varible as well as having 20 odd small session varibles on the go with a high user rate?<BR><BR>Just how much strain would this put on a server? I&#039d need the server to be as fast as possible really so would like not to put too much strain on it. Seemed that session varibles are faster then databases, although I&#039ve never used so many of them in one application before.<BR><BR>Also do I need to lock the application varible if I&#039m just reading from it?<BR><BR>Any pointers would be appreciated.<BR><BR>Pete

  2. #2
    Join Date
    Dec 1969
    Posts
    552

    Default RE: Session and Application varibles

    Sounds like a solution to me. Bad things happen when you put large objects in Session-level variables, but if you keep it as small variables, shouldn&#039t be too bad.<BR><BR>Not had too much experience with Application level variables (as far as performance goes). From what I understand, though, you don&#039t need to lock the application scope when reading, just when writing. I&#039d say go for it, application level&#039s gonna be quicker than the db. Good luck!

  3. #3
    Join Date
    Dec 1969
    Posts
    267

    Default RE: Session and Application varibles

    I currently have a site that uses a couple of Application level Dictionary objects to store data. As you would expect, the performance is much better than a database. I did not see any degradations in server performance when I implemented them, and I also have not experienced any data integrity issues.

  4. #4
    Pradeep Sharma Guest

    Default RE: Session and Application varibles

    Application level variable with 30K of data should be able to withstand substantial site loading. Assuming it is dedicated NT server running IIS4.0 with 256 MB of RAM, 30K application variable is sure a bet.<BR>However there is only one catch, you will have to decide if this data is updatable by individual users. In which case concurrent access to array data can pose some problems.<BR>Having said all that I would not put anything more than user Identification data and some flags in the session variables.


  5. #5
    Join Date
    Dec 1969
    Posts
    511

    Default RE: Session and Application varibles

    Thanks for all that.<BR><BR>The Application Variable only get written to in the ONAPPLICATION_START event in the Global.asa<BR><BR>I intended to use about 15 session variables for every users, although as you said most of these are flags, numbers and the odd small array(20) of numbers.<BR><BR>Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •