If you told us what you were doing it would be a big help. Storing data in
application memory? Why not just have the database or a windows service
update an XML file and display it to page? You can set refresh to 5 seconds
then without worrying about hitting the server.
Otherwise there are lots of ways to cache data so it's not pulling from the
database everytime. Your slowest point of your application is going to be
every time you make a new page request or refresh the page. I hate to use
autorefresh. Your connection goes bad and your user is looking at a blank
page.
You can never push data using HTTP. HTTP is a request-response synchronous
action. There is a way to push data to the web browser, by using Flash,
Java, and sockets, but sockets create a huge load to the server.
-Max
"Strange Cat" <st*****@cat.com> wrote in message
news:qC*********************@news3.tin.it...
Hi everyone!
I'm about to start a new project and I'd like to hear from someone more
experienced than me.
What I'm requested to do is:
Display an autorefreshing page that gets data from a SQL Server DB on web
clients: kinda know how to do this, autorefreshing page with HTTP Tag
META... and so on.
BAD IDEA.
What I'm begin asked to do is NOT TO QUERY THE DB every time the page
refreshes, but instead keep the data in memory (an Application.Item would
be ok I guess) and refresh the data in Application.Item ONLY when a change
occurs in DB Data.
Then why refresh the page? Try using Flash or Java to push data to the
client.
I would also write a separate (Windows Forms) program that gathers data
and updates the DB.
Sounds like a job for a Windows Service. Use Windows app to set a config
file. Load the service on your web server to run at start up and read the
config file.
What's the problem, then? How can I INFORM the ASPNET application that
data has changed in DB and it's time to refresh the data in Application memory?
Use a Webservice? Really dunno...
Web services are used for interoperability
Thanx in advance for any idea.
ASC