views:

115

answers:

1

I am going to be coming up with a design for calling WCF services from our WPF front end clients. One thing I really don't like is the tight coupling of a WCF service's configuration to the client. I have read a couple of articles on ws-discovery in .NET 4 and was wondering whether this would be a common model that people use for handling this?

So the way I see it is you have a client that says "I have a method call and it should be handled by a service that implements ISomeInterface". You could then have a number of services dotted around (perhaps part of some common ESB?) that implement that interface. The method call from the client will then be routed to one of these services automatically. Am I understanding this correctly? If so, what would be the disadvantages of such an approach?

Many thanks

A: 

WS-Discovery sends out a broadcast message saying "Who can handle this"?

This is both simple and, err, problematic. Imagine I'm feeling evil so I look at the services on your network and write a server which responds with "I do" ...

So you need to ensure your probes are limited by scope, for example put all your services in known LDAP OUs that an attacker cannot run in. The WS-Discovery spec contains a security section which you should read and understand :)

Aside from that yes, it's going to be one approach. Or you could implement a service broker service which accepts all messages and then forwards them onto the current server/implementer, load balancing that to provide resilience.

blowdart
Thanks for the response. If implementing a service broker approach though, will that not add overhead due to having some form of intermediary in-between the client and the service? Would this kind of design be something acceptable for thick clients where you typically want something responsive?I am just trying to work out a common pattern and make sure it is going to be suitable.Thanks again
Jon Archway
Yes, the broker will be a bottle neck. You could also look at a UDDI approach, where, when looking for a service for the first time, you ask a central point where to go and after that connect directly
blowdart
Thanks again. What approach do you use, or are your clients and services tightly coupled by config?
Jon Archway
All my work has been with public, internet facing services, so tight coupling to a URL is always going to be there, so it's not been a problem for me - sorry!
blowdart