Search code examples
wpfwcfws-discovery

WPF WCF ws-discovery


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


Solution

  • 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.