0

I'm still writing my financial software :P And have finally gotten a reliable real data live data feed which I am currently storing into my SQL Server database in real time.

As in the stock market, timing is everything, I am wondering how I would be able to have my client machines be notified of database inserts as they come in? At times there could be up to 200 updates a second on the database and at others less than 1 a minute.

How would I implement a system where my client application (Windows Forms C#) would be notified of new data and its data immediately with no delay (millisecond timing) upon the update of my database on a server co-located?

Will I need to have a thread that constantly interrogates my database? Would that be too much load? TCP/IP Sockets for clients and Database?

I suppose I'll have to be writing something like a datafeed??? How would I go about developing something like this????

Thanks

David

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
DeveloperDavid
  • 157
  • 2
  • 7
  • 16

2 Answers2

0

One mechanism is to user triggers in your database: C# / SQL Listener to tell me if a row has been inserted into a table However I don't know if they can guarantee you millisecond timing.

Community
  • 1
  • 1
ChrisWue
  • 18,612
  • 4
  • 58
  • 83
0

Why do you have to store the data in database if the updates to the client have to be real time? Can you not bind the feed to a dataobject on middletier/client and then on change event (think observer pattern) of that dataobject you can rebind the client. You can store data in the SQL once the binding is done just for audit purposes.

ViSu
  • 462
  • 2
  • 4
  • 17
  • This is a very good suggestion :D I like this architecture design as storing or archiving to the Database should be a secondary concern and pushing data to the clients should be the first and of utmost importance to keep latency as low as possible. Thank you, I will look into sockets, server & client model. – DeveloperDavid Jul 08 '11 at 14:20