开发者

circumventing WCF with direct calls to a DLL in a single user environment

I am helping a company with a software package that will flexibly support multiple deployment scenarios. The package is written with .NET, has a well defined BLL, and utilizes SQL Server for the database.

The design calls for a clear delineation between data access and services (BLL) and UI. There are at least two UI front ends at this point (WinForms and Web). We are proposing a WCF solution to run the BLL layer which can be run on a beefy application server. This path is pretty well marked and understood at this point, and covers one of our required deployment scenarios.

The deployment scenarios are (in no particular order):

  1. Large multi user environment with 1-n application servers all开发者_Python百科 hitting a suitably sized dedicated SQL server.

  2. Multi user environment running the UI/BLL on each individual’s machine all accessing a shared SQL server.

  3. Single user environment with a single machine running the entire application on their box (including SQL server).

My concern is not so much with scenario (1) as much as (2) and (3). If the deployment is a flavor of type (2) or (3), WCF isn’t really buying us anything at that point and would hamper performance. Can someone suggest a way an application can be designed so that when deployed in scenario (1) it utilizes a BLL running on a application server, but in (2) or (3) where most if not all of the entire stack is on a single machine, WCF can be circumvented with more traditional calls to the BLL?

The BLL logic would remain unchanged between all scenarios. Just in (2) or (3) I would like to have the BLL DLL loaded in memory with direct calls to it w/out having to go through WCF.

I really appreciate any advice from the community on this!


You could consider null transport binding from this CodeProject project. Gives you the same semantics in every case, i.e. using WCF, but without the overhead in cases (2) and (3).


Use named pipes as your transport. It will still give you an overhead for serializing, but that is properly rather small.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜