views:

60

answers:

1

Hi guys,

I am new to this technology so this might have been asked before and I do not know - so sorry to start with.

I have a message Queue and I am designing a WPF interface for it. The actual message queue(MSMQ) contains information to do with trains(model trains) so i need to show their exact location in real time. From section to section, the interface needs to replicate this.

Any clues, directions? I am okay designing the animations and the message Q, but it is the synch between them that I need to do...please help.

Thanks

A: 

Message queueing is not a real time transport. It is very asynchronous in its nature. You have to do lots of polling to get "real time data".

You could pick any format you like, you don't even have to use XML. But if XML is your route you could define an XSD-schema and generate a C# class with xsd.exe. Or you could just define a C# class and serialize it with System.Xml.Serialization.XmlSerializer.

But to be honest, are you sure you should use MSMQ for "real time" data?

Albin Sunnanbo
Thanks Albin Sunnanbo, this is a project that involves a lot of hardware communication and I thought using a message Queue would simplify communication standards issues, what would you suggest instead?Many thanks,
That depends on how you communicate with your hardware and your real time requirements. Are the hardware parts "stand alone parts" connected to a network or attached to your controller computer with USB or serial port? If frequent polling, lets say every second is "real time" enough, then MSMQ works OK.
Albin Sunnanbo
Hi there, they are attached to the controller computer via USB port. For this purpose(just a demo), every few seconds is considered "real time"...
A few seconds will be no problem with MSMQ. But you could also create a web service that reports the "lastest position" or whatever that the client can poll every second or so. That will also work. If you go for the web service track you could later on implement "long polling" to get an "event driven" kind of system where the notifications are propagated immediately.
Albin Sunnanbo