473,944 Members | 15,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1325
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******** ******@TK2MSFTN GP03.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
2483
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 (English, French) in a *single* repository (<- files or database) and generate documents in the various languages and target formats (XHTML, PDF, HTML Help, Text) on demand. I am not a programmer, though, and can't develop my own tools, but of course...
4
1103
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. the application calculates the estimated rates using a base rate as a basis against a data that holds item details to be charged.
9
2678
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 operations on purchase orders and inventory. I have created a PurchaseOrder class and Inventory class to encapsulate operations like creating POs, finding items, etc. These two classes are used extensively from different parts of the app.
8
1573
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 then writes the 'cooked' data to database_B (probably not in that order). Also I will have some buttons on this main window that open some other winforms so I can capture other bits of info and adjust the main window's pretty dials and textboxes...
1
2083
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 data to browser users through a web server. So basically I need a full-time web server and a separate way to poll web services for their data. There is no database involved. The problem is that I have tried several Python web servers...
5
2949
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 Studio 2005 (along with the developer's edition of MS SQL Server), but not MS Access. I also have MySQL, PostgreSQL, Sun's application server, Tomcat and Apache web server. I am working on Windows XP Pro, and have installed the .NET 3 SDK and...
1
1479
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.. 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
0
980
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 constructor is completely filling out the entire class. This is good because at anytime using that class I know the data is complete, however I am worried about how much data is being stored in
7
1775
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 this polling loop is entered synchronously from OnStart, basically the OnStart event doesn't terminate for the life of the program. This doesn't give the SCM the correct feedback that the service has started properly. Consequently, the SCM throws...
0
10143
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11134
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11306
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10671
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9868
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8234
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7396
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4918
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3518
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.