sql-serversocketsc#-4.0financialdatafeed

SQL Server & C# immediate notification to client when database updates with millisecond timing


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


Solution

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