views:

199

answers:

2

Hi,

I have to monitor some data during the day (basically a log stored in a Oracle table), and it has to be as close to real-time as possible. So what I need is:

  • A good way to get incremental data from the table (replication packets?); and

  • A good way to display it on both a web page and a C# GUI monitor.

Explaining the existence of two displays: they're aimed for different users, role-based - embedded question, any advice on middle layer filtering method?

Rgs,

Arthur

A: 

Wouldn't you simply have an auto-refreshing (meta tag) asp.net page, which does a select straight from your log table. Refreshing say every 5 seconds wouldn't put undue load on your oracle server i'd think, especially with only 2 users (i assume the GUI version is conceptually similar).

Chris
@Chris: Actually there are only two roles, but each one has 8-10 users under it. First I thought on using caching + filtered views, but I'm not really sure it's the best approach since I'm working with incremental data. Besides, I need it to work for both the ASP page and the application, so it needs to be in a middle layer if I want it to be a single cache (no regular ASP caching).
casals
If you want somewhere between one second and 10 second accuracy, with 20 users max, i'd say caching wouldn't be needed, just directly query once every second. Unless the table is hugely complicated or something.
Chris
A: 

Marking as answered, only today finished something that worked well.

All the data I need comes from a legacy query, ugly and slow. It uses a dozen of tables, and I need to keep it updated just because of two of them (the others change like three or four times a day only).

The solution was to refactor (and exhaustively test) the query so I could divide the tables in three groups:

  • Tables that don't change at all;
  • Tables that rarely change over the day;
  • Tables that change frequently.

This way I was able to query the high-frequency ones every second, and keep the others updated in a reasonable manner. Data merging was not an issue when done programatically.

Thanks for the help,

casals