You likely won't see great perf gains from this architecture
unless the
database is slammed or the query takes a LONG time to
return. Why not put
the cache on the webserver(s)? Then it will be accessed
very quickly in
memory. If you're concerned about maintaining multiple
copies of the cached
data, there are options that address this including ScaleOut
StateServer,
NCache, or ASP.NET 2.0 SQL Cache Invalidation.
Steve
-----Original Message-----
From: Glenn Smith [mailto:glenn.asp googlemail.com]
Sent: Friday, February 09, 2007 11:57 AM
To: aspnet-architecture aspadvice.com
Subject: [aspnet-architecture] Caching objects in a remote
singleton
Not sure i'm structuring my app right here.
I'm writing a website, where primarily the data is pulled
from Oracle via
PL/SQL. The data will rarely change over time.
So my thought was the best way would be to write a remote
object that is
called by the web page to retrieve the data. The first time
through the
data would be pulled from Oracle. The second time through,
either by this
user or any other, the user would be pulled from a cache.
Is this the right way of going about it (ie. would use you
"remoting" or
would you use a webservice, or any other way?). Assuming it
is the right
way, how would you cache the data in the remote object? I
was going to use
the "Cache" but this is (I think) a
System.Web.Caching object and I think is
therefore not designed to work within a standard class
library running on
the server (?).
Any thoughts gratefully appreciated.
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
|