Hi sindhu,
In the Multithreading realtime chart sample code, one thread is used to acquire data, and another read is used to display data. This is useful for a desktop program in which data acquisition and display are done by the same process.
In ASP.NET MVC, there are many computers - a server computer and many client computers (the browser computers). They are always running concurrently and independently. The server is always multithreading as it needs to support many clients concurrently.
In a web based realtime chart, typically, you have a data acquisition program that obtains the data and then store the data in some place (such as in a database, etc). The program is unrelated to the server or the browser, because the program needs to acquire data even if no browser is accessing the web site.
When a browser sends a request to web server, if the code in the web server should obtain the latest data from the database (or whatever storage method that your data acquisition program use). It can then return the chart to the browser. The browser web page will periodically access the web server (eg. once per few seconds), and each time, the server will return a chart using the most updated data.
In the realtime chart sample code, the data come from a random number generator. In your own program, please replace the random number generator to your own code that reads your realtime ECG like data (from the database or the storage that your data acquisition program stores the realtime data).
So the original realtime chart sample code is already the sample source code you can use. You just need to change the random number generator to code that reads your real data. And of course, you need a program to read realtime data from your ECG like device and store them in the database or some place.
Regards
Peter Kwan |