473,320 Members | 1,977 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,320 software developers and data experts.

Storing application specific information

I have some data that is been retrieved from a call to sql server stored
procedure that I want to store for a period of time in a web farm
architecture. I want to minimize the calls to sql server as much as
possible. Storing it in application cache will result the calls to be made
if the users are bounced from one server to another. But is this the best
resolution or is there any other methodology that I can use which will be
more optimized for my purpose?

Any help on this matter is greatly appreciated.
Nov 19 '05 #1
4 1281
It depends on how the data is used. Is it common to all users, or is
different data retrieved for each user?
If it is common to all users, using the ASP.NET Cache is probably the
best option. Yes, it will be retrieved once for each server in a farm,
but that is a pretty low cost to pay.
If the data is specific to each user, you should probably use
out-of-process Session. You can configure session to use the Session
State service or SQL Server in your web.config file. Programmatically,
you just use the Session object like you normally do. With
out-of-process session, it wont matter which server in the web cluster
the user is on; their data will be available.

Joshua Flanagan
http://flimflan.com/blog

kanones wrote:
I have some data that is been retrieved from a call to sql server stored
procedure that I want to store for a period of time in a web farm
architecture. I want to minimize the calls to sql server as much as
possible. Storing it in application cache will result the calls to be made
if the users are bounced from one server to another. But is this the best
resolution or is there any other methodology that I can use which will be
more optimized for my purpose?

Any help on this matter is greatly appreciated.

Nov 19 '05 #2
Thanks for the reply. The data is not user specific so I was leaning towards
application cache but I was concerned because of the web farm architecture
and hence the data being duplicated on the servers. Have you run across any
documentaion on performance metrics for this? Is State Server ONLY for
session/user specific data?

Thanks
Kan

"Joshua Flanagan" wrote:
It depends on how the data is used. Is it common to all users, or is
different data retrieved for each user?
If it is common to all users, using the ASP.NET Cache is probably the
best option. Yes, it will be retrieved once for each server in a farm,
but that is a pretty low cost to pay.
If the data is specific to each user, you should probably use
out-of-process Session. You can configure session to use the Session
State service or SQL Server in your web.config file. Programmatically,
you just use the Session object like you normally do. With
out-of-process session, it wont matter which server in the web cluster
the user is on; their data will be available.

Joshua Flanagan
http://flimflan.com/blog

kanones wrote:
I have some data that is been retrieved from a call to sql server stored
procedure that I want to store for a period of time in a web farm
architecture. I want to minimize the calls to sql server as much as
possible. Storing it in application cache will result the calls to be made
if the users are bounced from one server to another. But is this the best
resolution or is there any other methodology that I can use which will be
more optimized for my purpose?

Any help on this matter is greatly appreciated.

Nov 19 '05 #3
I don't see duplication of the data on 2 servers as a problem, unless
you expect the data to be updated by users during the execution of the
application. Then it becomes a big problem, as you try to keep the
servers in synch. Using session wouldn't help solve that problem either.
I don't know any specific performance documentation, but I'm pretty sure
you would not want to use the State Server for application wide data,
since it would cause the data to be repeated and stored individually for
each user session.
Remember, you usually only want to cache data results when it more
expensive to retrieve them from the original source. If you start
making a bunch of trips to retrieve the cached data, or use a lot of
memory for it (copying the same values to every session on every
server), you are probably hurting yourself more than helping.
I would not be afraid to make a single call to populate the ASP.NET
cache on each server on a web farm.

kanones wrote:
Thanks for the reply. The data is not user specific so I was leaning towards
application cache but I was concerned because of the web farm architecture
and hence the data being duplicated on the servers. Have you run across any
documentaion on performance metrics for this? Is State Server ONLY for
session/user specific data?

Thanks
Kan

"Joshua Flanagan" wrote:

It depends on how the data is used. Is it common to all users, or is
different data retrieved for each user?
If it is common to all users, using the ASP.NET Cache is probably the
best option. Yes, it will be retrieved once for each server in a farm,
but that is a pretty low cost to pay.
If the data is specific to each user, you should probably use
out-of-process Session. You can configure session to use the Session
State service or SQL Server in your web.config file. Programmatically,
you just use the Session object like you normally do. With
out-of-process session, it wont matter which server in the web cluster
the user is on; their data will be available.

Joshua Flanagan
http://flimflan.com/blog

kanones wrote:
I have some data that is been retrieved from a call to sql server stored
procedure that I want to store for a period of time in a web farm
architecture. I want to minimize the calls to sql server as much as
possible. Storing it in application cache will result the calls to be made
if the users are bounced from one server to another. But is this the best
resolution or is there any other methodology that I can use which will be
more optimized for my purpose?

Any help on this matter is greatly appreciated.

Nov 19 '05 #4
Thanks for the reply. It looks like application cache is the way to go. I
was reading up on it specifically with regards to amount of information that
is ideal to store. I was planning on saving a hashtable with about 50
Key-Value pairs in it. Is this a good way ? Or should serialization of the
data be considered? Have you run into any articles with size limitation for
the application cache?

Appreciate a reply.

"Joshua Flanagan" wrote:
I don't see duplication of the data on 2 servers as a problem, unless
you expect the data to be updated by users during the execution of the
application. Then it becomes a big problem, as you try to keep the
servers in synch. Using session wouldn't help solve that problem either.
I don't know any specific performance documentation, but I'm pretty sure
you would not want to use the State Server for application wide data,
since it would cause the data to be repeated and stored individually for
each user session.
Remember, you usually only want to cache data results when it more
expensive to retrieve them from the original source. If you start
making a bunch of trips to retrieve the cached data, or use a lot of
memory for it (copying the same values to every session on every
server), you are probably hurting yourself more than helping.
I would not be afraid to make a single call to populate the ASP.NET
cache on each server on a web farm.

kanones wrote:
Thanks for the reply. The data is not user specific so I was leaning towards
application cache but I was concerned because of the web farm architecture
and hence the data being duplicated on the servers. Have you run across any
documentaion on performance metrics for this? Is State Server ONLY for
session/user specific data?

Thanks
Kan

"Joshua Flanagan" wrote:

It depends on how the data is used. Is it common to all users, or is
different data retrieved for each user?
If it is common to all users, using the ASP.NET Cache is probably the
best option. Yes, it will be retrieved once for each server in a farm,
but that is a pretty low cost to pay.
If the data is specific to each user, you should probably use
out-of-process Session. You can configure session to use the Session
State service or SQL Server in your web.config file. Programmatically,
you just use the Session object like you normally do. With
out-of-process session, it wont matter which server in the web cluster
the user is on; their data will be available.

Joshua Flanagan
http://flimflan.com/blog

kanones wrote:

I have some data that is been retrieved from a call to sql server stored
procedure that I want to store for a period of time in a web farm
architecture. I want to minimize the calls to sql server as much as
possible. Storing it in application cache will result the calls to be made
if the users are bounced from one server to another. But is this the best
resolution or is there any other methodology that I can use which will be
more optimized for my purpose?

Any help on this matter is greatly appreciated.

Nov 19 '05 #5

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

Similar topics

10
by: Steve | last post by:
Hi all i am just starting to get back into VB and i need a little help. I am writing a program that asks a user to type in a set of numbers/letters (in this case shipping containers). Once the...
0
by: Mark | last post by:
My question is very general, but to properly explain it, i will ask a specific one. In our SQL 2000, .NET based application we have as a Device table, which lists all the devices. That device...
2
by: Robert Hanson | last post by:
I am new to the asp.net application building and I have read the information regarding the storing of information using session vs cookies vs viewstate. I am asking for suggestions/guidance as to...
1
by: Ritu | last post by:
How to store connection strings in machine.config?What are the advantages of storing it in the machine.config file.Can u provide me with the information regarding accessibility of machine.config...
2
by: Frankie | last post by:
Using SQL Server 2005 and .NET 2.0; I'm creating a Windows Forms application that will need to display photos of people, along with a bunch of information about each person. In a Web...
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
3
by: Mark | last post by:
I'm consuming a webservice that makes a simple object available. The object class is marked in the web service as . I have a web application that consumes and uses this web service's class. When...
9
by: KarlM | last post by:
After reading some articles regarding confuguration data I'm a bit confused. Where is the right place for storing configuration data? - XML-files? - registry? - INI-files? (from a users point...
7
by: Andy Fish | last post by:
Hi, Is there anywhere inside the HttpRequest object that I can use to store my own information? from what I can see things like ServerVariables are made read-only. If not, does anyone else...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.