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

Technical advice needed regarding polling the database

I have a database which is very frequently updated .I want an option that
user can specify that after how many minutes he/she wants to see those
changes . Like a mechanism which would do

1.. Poll database after a user defined period and then bring those changes
,mean while displaying the stale data (like Cache )
2.. Also allow user to choose if he/she wants to see/notify updates as
they come
3.. Can notify change ( if any ) in a particular table occur
I have read a lot about SQLDependency class which is used to data caching
..The reason I am confused is

1. The recommendations are that don't use this feature if your data is
frequently updating (in my case data is frequently updating)

2. The class does Cache data for me but I cant find any mechanism which
would notify me that a change has occurred and how many row in a particular
table are added.

I am confused .What feature I should used . Should SQLDependency class can
do the things I want or these can be done without SQLDependency Cache
feature .

Please advice.

Thanks in advance
Dec 19 '06 #1
1 1306
Is it safe to assume that the user is using one app to view the db while it
is a seperate mechanism or app that is updating the db?

One thing that my team has done is to install SQL Server Notification
Services, and configure it to send a notification to a central location if
the data has changed. Then, when an app starts, it can register itself with
the central location as "interested" in these events. The central store can
either send the events directly to the app, or more appropriately, it can
send the events to a cache management system that uses configuration data to
decide if it should update the cache right away or at a later date.

The user at the client end always asks the cache for data. The cache system
will go to the local db, and if the data is old, or if a message has come in
saying that the data is obsolete, then it can do one of two things: a) it
can return to the caller with obsolete data (and an indicator saying so) or
b) it can hold the caller thread and ask the source system for updated data.

This works for our systems. I hope this helps.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Nadia Amir" <na********@aku.eduwrote in message
news:ue**************@TK2MSFTNGP03.phx.gbl...
>I have a database which is very frequently updated .I want an option that
user can specify that after how many minutes he/she wants to see those
changes . Like a mechanism which would do

1.. Poll database after a user defined period and then bring those
changes ,mean while displaying the stale data (like Cache )
2.. Also allow user to choose if he/she wants to see/notify updates as
they come
3.. Can notify change ( if any ) in a particular table occur
I have read a lot about SQLDependency class which is used to data caching
.The reason I am confused is

1. The recommendations are that don't use this feature if your data
is frequently updating (in my case data is frequently updating)

2. The class does Cache data for me but I cant find any mechanism
which would notify me that a change has occurred and how many row in a
particular table are added.

I am confused .What feature I should used . Should SQLDependency class can
do the things I want or these can be done without SQLDependency Cache
feature .

Please advice.

Thanks in advance


Dec 27 '06 #2

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

Similar topics

4
by: David Winter | last post by:
As a technical author and translator, I am highly interested in single source/multi format publishing. Meaning: I'd like to keep manuals, technical specifications etc. in multiple languages...
4
by: Ann Marinas | last post by:
Hello all! I really need your advice/ suggestions/ comments regarding a particular program of mine that I am currently developing. What the program does is that 1. the user imports data 2....
9
by: Laban | last post by:
Hi, I find myself using static methods more than I probably should, so I am looking for some advice on a better approach. For example, I am writing an app that involves quite a bit of database...
8
by: bob | last post by:
I am unsure how to approach a C# windows App. Essentially I want to do this. I want to write an app that reads from database_A performs some calculations updates the pretty dials on the screen...
1
by: Ron Davis | last post by:
I have recently discovered Python and like it quite a bit. I would like to use it on a new project I am starting. The project will gather data from several web services and present the collected...
5
by: Ted | last post by:
I am working on two versions of an application, one of which will be a windows forms application (which will need to be redistributable) and the other will be a web application. I have MS Visual...
1
by: Nadia Amir | last post by:
I have a database which is very frequently updated .I want an option that user can specify that after how many minutes he/she wants to see those changes . Like a mechanism which would do 1.....
0
by: Jeremy Martin | last post by:
Hi, Just want a bit of advice regarding a 3-tier Web App. Currently I have a DB class that fills its details on the constructor and in the class contains many other classes. So basically the...
7
by: Joseph Geretz | last post by:
I have a Service which runs OK, but I'm abviously not starting it properly. In my OnStart event I commence a long running process which polls a database table and performs various processing. Since...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.