Reputation: 773
I want to display some real-time data in a chart, in a WPF client. The data should come from a WCF service. Right now, it works with a basic WCF service (wsHttpBinding), but it doesn't fulfill my need of real-time plotting. I call the service asynchronously, then update my UI, but I need to eliminate the time of waiting for the service call to finish.
I want to be able to read a value from the service stream every 40 miliseconds, and update my chart. Which is the best way to do this using WCF?
Upvotes: 0
Views: 214
Reputation: 22445
do you have some code what you have so far?
i would simply open a duplexclient proxy and listen to the wcf service callbacks. but to be honest, i dont know how fast it is.
Upvotes: 0
Reputation: 65461
If you have an absolute requirement of 40 millisecond old data then WCF may not be the correct choice. WCF protects you from the plumbing, but that comes at a cost. You can get better performance using sockets directly.
For an example of how to use streaming in WCF see: http://msdn.microsoft.com/en-us/library/ms789010.aspx
Also Infragistics have some WPF controls for showing realtime data. See: http://www.infragistics.com/dotnet/netadvantage/wpf/data-visualization.aspx#Overview
Upvotes: 1