Reputation: 3735
In a large scale modular web application based on Asp.Net Mvc
, I have implemented a WCF
self-hosting mechanism to provide communication every modules with each other. This was a good practice for me, because by this mechanism the modules have became independent and there is not any direct references. and the next advantage is external applications or the clients if my customers have been able to access these services through WCF
service.
The mechanism is the searching and injecting the services from module by the IoC
features and hosting them with BasicHttpBinding
binding type.
Also the Endpoints of the serivces are configured in a particular URL plus service name (for example the consider the MyService
: http://localhost:8080/Services/MyService
)
My concern is performance of communication of the modules inside the app process, which they are the same machine, same process in IIS
and differs to the external clients.
Is there any distinction between external clients and internal ones in communication layers, OR NOT they are be treated by the same behavior?
If NO, Which features are need to increase the internal clients performance?
Upvotes: 1
Views: 599
Reputation: 3757
When you're talking about external clients, you must keep your services must compatible as you can, so you can use http binding, so clients from different plataforms can consume your services.
But when you'retalking about internal clients, all using .Net, you can handle different. You can use tcp binding to improve your performance, since all clients are internal.
There is a sensible performance difference between a http and tcp clients, you see a benchmark here: http://media.techtarget.com/TheServerSideNET/downloads/DotNet-WebSphere_Web_Services_Benchmark.pdf
So, you can improve your performance doing your service accepting both http and tcp bindings, and setting your internal clients to consume your service over a tcp binding.
Here is also a good link talking about tcp and http bindings:TCP Vs. Http Benchmark
Hope it helps.
Upvotes: 1