473,467 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Implementation question

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.

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.

I would also write a separate (Windows Forms) program that gathers data and
updates the DB.

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...

Thanx in advance for any idea.

ASC
Nov 18 '05 #1
8 1248
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

Nov 18 '05 #2
[CUT]

Thanx for answering Max.

The project I'm about to start monitors data coming from a proprietary
network of badge readers (the ones used to open doors).

So there is a windows forms program that is "connected" to the network via a
non managed DLL which gathers data from the proprietary network (badges ids
being read) and stores them in a SQL Server DB.

Some Web clients (with autorefresh) display data from the DB.

As I stated before, I don't know how to inform the ASPNET app when to read
new data from the DB, and honestly I didn't understand your answer about
displaying XML on the browsers. The graphics design matters, and I don't
think XML would look very nice on a browser windows.

It's no easy task for my limited ASPNET experience...

Thanx

ASC
Nov 18 '05 #3
[CUT]

Sorry, forgot: I know like nothing about Flash and Java...

Bye

ASC
Nov 18 '05 #4

"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.

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.

I would also write a separate (Windows Forms) program that gathers data and
updates the DB.

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...

Thanx in advance for any idea.

ASC


A google search for "database cache dependency asp.net" lead to this link:
www.eggheadcafe.com/articles/20030716.asp

The data (read from the database) is stored in the Cache, with a dependency
on the database (through some tricks), so the cached data is removed when
the database has changed.
Have not tried it, but sounds promising.

Hans Kesting
Nov 18 '05 #5
[CUT]

Thanx for answering Hans, you did what I should have done, google... but I
didn't know how to put down a google query for asking that... My english
isn't good enough.

Thanx a lot! I will surely read and test what is explained there!

Bye

ASC

Nov 18 '05 #6

"Strange Cat" <st*****@cat.com> wrote in message news:G8*********************@news3.tin.it...
[CUT]

Thanx for answering Hans, you did what I should have done, google... but I
didn't know how to put down a google query for asking that... My english
isn't good enough.

Thanx a lot! I will surely read and test what is explained there!

Bye

ASC


Thought so. IF you known the right keywords, it's not difficult. The trick
is finding those keywords (that's why I mentioned them) ...

Hans Kesting

Nov 18 '05 #7
Keep reading.
He wrote a follow up article that uses the same technique as ASP.Net 2.0.
I implemented it and it works well.
But read my comments at the bottom of the page as the article does not fully
cover everything.
--
Joe Fallon
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:Oj**************@TK2MSFTNGP12.phx.gbl...

"Strange Cat" <st*****@cat.com> wrote in message

news:G8*********************@news3.tin.it...
[CUT]

Thanx for answering Hans, you did what I should have done, google... but I didn't know how to put down a google query for asking that... My english
isn't good enough.

Thanx a lot! I will surely read and test what is explained there!

Bye

ASC


Thought so. IF you known the right keywords, it's not difficult. The trick
is finding those keywords (that's why I mentioned them) ...

Hans Kesting

Nov 18 '05 #8
It sounds like with your skill, you are doing it the best way you can. This
seems like a specialized web app that won't have 100's of people accessing
it at the same time, so you don't really need to worry about caching until
you start seeing it slow down. Set the browser to refresh a set interval.
Just query the database each time. Then tell your boss not to forget to
test it, so he doesn't blame you if 1000 people get on at once and crash it.

-Max
"Strange Cat" <st*****@cat.com> wrote in message
news:Nk*********************@news3.tin.it...
[CUT]

Thanx for answering Max.

The project I'm about to start monitors data coming from a proprietary
network of badge readers (the ones used to open doors).

So there is a windows forms program that is "connected" to the network via a non managed DLL which gathers data from the proprietary network (badges ids being read) and stores them in a SQL Server DB.

Some Web clients (with autorefresh) display data from the DB.

As I stated before, I don't know how to inform the ASPNET app when to read
new data from the DB, and honestly I didn't understand your answer about
displaying XML on the browsers. The graphics design matters, and I don't
think XML would look very nice on a browser windows.

It's no easy task for my limited ASPNET experience...

Thanx

ASC

Nov 18 '05 #9

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

Similar topics

2
by: Kapil Khosla | last post by:
Dear all, I am trying to underlying implementation of virtual functions in C++. The way I understand polymorphism is class Base { public: virtual int func(); };
3
by: Yves Dhondt | last post by:
Hello, I've got the following UML design : C | A _____|______ B So 2 objects A and B are connected through a relation C. (For example an employment scheme : person A1 worked for company...
6
by: Paul Fame | last post by:
Hello World, This is not a flame, but a question about the fundamentals of the language. Unlike some languages, C++ requires class member functions to be declared twice: once in the class...
9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
3
by: masood.iqbal | last post by:
In this day and age, you never say no to any work that is thrown at you ---- so when I was offered this short-term contract to convert legacy C code to C++, I did not say no. Personally I believed...
175
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be...
10
by: Martin Zenkel | last post by:
Assumed two assemblies (one C# and one C++), C++ refers to C#. The follwing code compiles and works well under VS 2002! VS 2003 C++ compiler reports the error "error 2555:...
37
by: jortizclaver | last post by:
Hi, I'm about to develop a new framework for my corporative applications and my first decision point is what kind of strings to use: std::string or classical C char*. Performance in my system...
1
by: Varun Kacholia | last post by:
Hi, I have a question regarding SGI STL sort implementation: In case of equal elements, will they be output in the same order each time I sort? (I understand that it is not a stable sort, and by...
12
by: Slaunger | last post by:
Hi, I am new here and relatively new to Python, so be gentle: Is there a recommended generic implementation of __repr__ for objects equal by value to assure that eval(repr(x)) == x independet...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.