4.0/WCF: Best approach for bi-idirectional message bus?

Posted by TomTom on Stack Overflow See other posts from Stack Overflow or by TomTom
Published on 2010-04-20T11:18:50Z Indexed on 2010/04/20 11:23 UTC
Read the original article Hit count: 334

Filed under:
|
|

Just a technology update, now that .NET 4.0 is out.

I write an application that communicates to the server through what is basically a message bus (instead of method calls). This is based on the internal architecture of the application (which is multi threaded, passing the messages around).

There are a limited number of messages to go from the client to the server, quite a lot more from the server to the client. Most of those can be handled via a separate specialized mechanism, but at the end we talk of possibly 10-100 small messages per second going from the server to the client.

The client is supposed to operate under "internet conditions". THis means possibly home end users behind standard NAT devices (i.e. typical DSL routers) - a firewalled secure and thus "open" network can not be assumed.

I want to have as little latency and as little overhad for the communication as possible.

What is the technologally best way to handle the message bus callback? I Have no problem regularly calling to the server for message delivery if something needs to be sent... ...but what are my options to handle the messagtes from the server to the client?

  • WsDualHttp does work how? Especially under a NAT scenario?

Just as a note: polling is most likely out - the main problem here is that I would have a significant overhead OR a significant delay, both aren ot really wanted. Technically I would love some sort of streaming appraoch, where the server can write messags to a stream while he generates them and they get sent to the client as they come. Not esure this is doable with WCF, though (if not, I may acutally decide to handle the whole message part outside of WCF and just do control / login / setup / destruction via WCF).

© Stack Overflow or respective owner

Related posts about wcf

Related posts about message-bus