locked
WCF - Real world doubts RRS feed

  • Question

  • User180117721 posted

    Hi There!

    In real world

    1. Where WCF services are hosted - IIS, windows apps, win services?

    2. Are those hosted dynamically e.g. WCF service open in service for 8 hrs a day like that?

    3. Is client info collected and stored?

    4. Are different type of hosting protocols (HTTP, TCP ..) used for same service?

    Thanks!

    Monday, July 1, 2013 3:32 PM

Answers

  • User-488622176 posted

    Sukumarraju is right : unless you can give us your real requirements or real-world consideration, we can only provide you with the theory...

    • Where WCF services are hosted - IIS, windows apps, win services?
      • 95% in IIS, 5% in windows service, depending on the scenario
      • If you want an application server without IIS, run the WCF service in an windows service
      • I have not encountered the need to hose a WCF service in a windows app (unless for debug purposes : I write my Windows services as native console apps with different behavior in debug/release build. In release, the Service logic is added, in debug they are merely console apps
    • Are those hosted dynamically e.g. WCF service open in service for 8 hrs a day like that?
      • services are hosted in a container (IIS, win service, ...)
      • The container availability defines the availability of the service
      • Unless you add an opening hours check in your code ...
    • Is client info collected and stored?
      • In my cases : only for debug & audit reasons
    • Are different type of hosting protocols (HTTP, TCP ..) used for same service?
      • Yes. For internally hosted services in windows service, I often use TCP for performance reasons (binary serialization is a little more performant then soap serialization of applied with HTTP(S)
      • TCP is easier to configure with transport security then HTTP(s) when managing own certificates
      • If one service call can be made from ajax (web performance consideration), you have multiple bindings for the same service

    HTH

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 3:43 AM

All replies

  • User220959680 posted

    1. Where WCF services are hosted - IIS, windows apps, win services?

    There are three generic categories of hosts for WCF Service

    • Self-hosting in any managed .NET application
    • Hosting in a Windows service
    • Hosting in different versions of IIS

    2. Are those hosted dynamically e.g. WCF service open in service for 8 hrs a day like that?

    Hosted service is ALWAYS available, waiting for the client requests. when the client invokes the service by sending a request, service responds accordingly. There is no frame/limit for the service response. It is 365 *24 * 7

    3. Is client info collected and stored?

    It depends on the type of the service, in typical banking sector client info will be stored to make sure that security is protected.

    4. Are different type of hosting protocols (HTTP, TCP ..) used for same service?

    It depends on the client base i.e., what type of clients using the service. Single service can be exposed through different end points to reach wide variety of client base.

     The main transports used in Windows Communication Foundation (WCF) are HTTP, HTTPS, TCP, and named pipes. 

    Refer: Transports in WCF

    Strongly suggest to go through complete article: What is Windows Communication Foundation 

    Monday, July 1, 2013 5:08 PM
  • User180117721 posted

    These  are basic answers that we get on internet or MSDN. I am looking towards implementation in real world..

    Monday, July 1, 2013 5:45 PM
  • User220959680 posted

    hemchand

    These  are basic answers that we get on internet or MSDN. I am looking towards implementation in real world..

    Until and unless the requirements are known 'no real world' solution can be suggested I am afraid.

    Please provide your requiremens i.e., (Security, Transaction scope, client base, Hyper media etc), so that possible solution can be suggested.

    Monday, July 1, 2013 6:45 PM
  • User-488622176 posted

    Sukumarraju is right : unless you can give us your real requirements or real-world consideration, we can only provide you with the theory...

    • Where WCF services are hosted - IIS, windows apps, win services?
      • 95% in IIS, 5% in windows service, depending on the scenario
      • If you want an application server without IIS, run the WCF service in an windows service
      • I have not encountered the need to hose a WCF service in a windows app (unless for debug purposes : I write my Windows services as native console apps with different behavior in debug/release build. In release, the Service logic is added, in debug they are merely console apps
    • Are those hosted dynamically e.g. WCF service open in service for 8 hrs a day like that?
      • services are hosted in a container (IIS, win service, ...)
      • The container availability defines the availability of the service
      • Unless you add an opening hours check in your code ...
    • Is client info collected and stored?
      • In my cases : only for debug & audit reasons
    • Are different type of hosting protocols (HTTP, TCP ..) used for same service?
      • Yes. For internally hosted services in windows service, I often use TCP for performance reasons (binary serialization is a little more performant then soap serialization of applied with HTTP(S)
      • TCP is easier to configure with transport security then HTTP(s) when managing own certificates
      • If one service call can be made from ajax (web performance consideration), you have multiple bindings for the same service

    HTH

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 2, 2013 3:43 AM
  • User503812343 posted

    Hi हेमंत चंदुरकर.

    1. Where WCF services are hosted - IIS, windows apps, win services?

        The beauty of WCF is its very flexible like you can host it in IIS, Windows services, windows app or self hosting.

    see implementation of hosting service is IIS

    See implementation of hosting service is windows service

    2. Are those hosted dynamically e.g. WCF service open in service for 8 hrs a day like that?

       yes, you can services dynamically hosted


    3. Client info can be collected and stored

    4. Yes you can use different type of protocols.

    See implementation of netNamedPipeBinding and its hosting

    Hope it helps you....

    Tuesday, July 2, 2013 10:50 AM
  • User180117721 posted

    Thanks Illeris

    You got my question.

    Others:

    I am NOT new in coding/designing world. I am curious about what is happening in world and popular trends. I am looking for what is being done rather than what can be done. Wink

    Tuesday, July 2, 2013 11:03 AM