Victor Haydin
Victor Haydin

Reputation: 3548

SOA: WCF and Web application - communication overhead

I am working on large enterprise system architecture. There are requirements to have several mobile clients, web UI and API for external applications. So, it is obvious that we should implement Service-Oriented Architecture. We will use WCF as service layer and ASP.Net MVC as framework for web application.

I am wondering how to implement interaction between web application and service layer. For most cases they will be hosted on the same server. Only large customers could use separate servers for service layer and web application. Usage of http binding to interact between web and service layer looks like really bad idea from the performance point of view. Is it possible to use WCF, hosted on the same server (or even inside the same .Net process) as MVC application without communication overhead?

Upvotes: 2

Views: 764

Answers (2)

Jared Peless
Jared Peless

Reputation: 1120

If you are communicating with WCF there will always be overhead. So I would think a more appropriate question is whether or not that overhead is OK to deal with or if you need to mitigate it in other means.

If your WCF service is executing logic and/or providing the interface to the data layer for mobile clients and API calls for external applications, can't that logic be moved to a common API that the service uses and, if run on an application internal to your organization (i.e. the web application) it can use the same API layer to avoid the service? That's likely how I would approach it. One more layer but that layer can be consumed by the WCF for exposing that way, or directly by the ASP.NET application (or any .NET application that has access to the resources).

Upvotes: 1

oleksii
oleksii

Reputation: 35905

You can try interprocess communication binding which is considered to be the most secure (doesn't accept calls from another machine) and the most fastest (lighter than TCP) binding that WCF supports.

Upvotes: 1

Related Questions