Real Time Applications

Hello Experts,

I have a winforms application that has several competing threads doing background work and updating the UI Controls on both dialog forms and the Main form. I am using VS 2008 and SQL Server 2008 Express. The DB resides on the client but outside of the solution.

It is starting to look like the application needs to be parted out into seperate stand alone programs that must share real time information. This is a robotics control application.

My question is if you were starting from scratch what technologies would you use and how would you go about communicating between the applications.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I would probably take a look at Message Queues and/or Windows Messages as the means of communicating between the various apps, kind of depending on the exact nature of the task and the communications needs.  I would lean toward the Message Queue approach for interacting with the database just because of the nature of databse interactions.
However, there are some inherent limitations that will arise when you start trying to do "real time" applications in a high level language that does not have a good compiler that compiles it to native code.  I know of no VS languages that compile to native code. ;-)
Jorge PaulinoIT Pro/DeveloperCommented:
You should pick WCF! It's the new communication standard, that allows the most commum communication protocols and you don't have to know them all: you just need .NET for that.
Check for more details, videos, etc on

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jwr1966Author Commented:

I have been looking into your suggestion. Services are new to me. We are measuring response times in milliseconds. How do you think WCF and Named Pipes would hold up?
jwr1966Author Commented:
I hope this posting helps. Like I said I am new to using services. However I think I am in love. Dividing my Multithreaded App into multiple projects is proving to be a lifesaver. It just makes things easier to manage. Especially knowing that in the future we are implementing Robotic Control over a network. I looked at Microsoft Robotics and WCF. I settled on WCF for our current implementation due to a shorter learning curve. For testing I set up a Winforms App to Host the Services. I created two clients - One in Winforms the Other in WPF. The Host contains a single class with a single Attribute and Property. Both of my Client Apps use While loops to hammer the service to get an average response time. I toggle the Host Attribute (Boolean Variable) between true and false in a try-catch block. I return true if it is successful. At first I was writing and then reading in two seperate calls. This started out at 3ms and then started creeping up. The memory leak was fast to start with and then tapered off, but did not stop gaining. At 30ms I shut it down to try something else. I read that WCF services return a value by default so I re-wrote things to  process in a single call. This did better but It still started creeping up in response time. Finally after tearing MSDN up I found the answer. Async. calls did the trick. My response time using the Named Pipes and Async. setting got me below 1ms and stable. As a side note I used the Ad Service Reference Wizard by right clicking on the Project name in the Client App. You can check the "Generate Asynchronous Operations" Box there. The Host App and Or Service Needs to Be started and running before you do this. Good luck.
jwr1966Author Commented:
This post got me onto the right track. Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.