开发者

Can multiple WCF services communicate with each other?

I'm 开发者_如何学编程just beginning WCF and so I don't understand exactly how the abstraction works. Can I write a WCF service and install the same thing on multiple machines, and have them communicate via some ID? I'm looking at sending/receiving commands, and continuous real-time data being sent between devices.


Any service you write can be installed on any number of machines - no problem there.

Any machine or code you run on those machines can also act as a client at the same time, calling other services, yes, absolutely, that's totally possible.

You need to define your service contract as an interface and in that service contract you describe the operations (service methods). Once that service is deployed, anyone can act as a client to that service and send it messages.

And of course, you can have an app (ASP.NET, Winforms whatever) that is both simultaneously - it offers services, but also acts as a client to other services.

Hope that helps a bit!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜