Multiple Endpoints vs Single Endpoint

Topics: General Discussion Forum, July and December Releases Forum
Nov 16, 2007 at 11:36 AM

I have a Web Client (WCSF) with an Foundational module where I have references and proxies for my Web Services that is both ASMX and WCF services. Im wondering if I should split my WCF service into multiple endpoints, say one endpoint for each Business Module in WCSF. My WCF service is beginning to be very big (proxy-code about 4000 lines of code) and in my Web Client I have modules like Customers, Suppliers etc. And they only use a few of all the methods in my WCF service.

The reason for me making one big service contract (and one very big implementation class, which I want to reduce) was that I have to log on the service before I can call any subsequent calls.
Before you can call any methods on the service you have to call the "LogIn" method that is marked with IsInitiating = true. Can I still keep this when I go for splitting up the service interface into multiple endpoints? How can the other endpoins know that the LogIn have been called first? I guess they can't?

My idea is to split my single-endpoint into mulitple endpoins like this:

Then in my WCSF-project I can each Module have access to only those service-endpoints that they actually need/use.... Sounds like a good idea to me but is it possible if I want to keep the IsInitiating=true on the LogIn-method?

I guess this will make it easier to maintain too, you can update only the service-endpoints and the respective client-modules when doing changes, right?

Any comments is appreciated

- RightCoder
Nov 25, 2007 at 9:27 PM
Was this post stupid or what? Can't belive no one has given any thoughts.... Is it unclear what I mean?

Nov 26, 2007 at 1:45 PM
I think is a good idea to split your contract into different endpoints (and contracts) for many reasons. However, you will have separate sessions for each contract and therefore one login per service according to the current approach.
On the other hand, I guess you will have very good reasons to use security strategy (login method + Session) and perhaps now that you plan to split the contract and you will likely want ot avoid multiple login calls, you may try with other authentication schemas like (ASMX, or WCF where you may avoid the login method and session as well.