locked
On Prem WCF Services hosting to Azure Service Fabric RRS feed

  • Question

  • Hi,

       We got the requirement to migrate the existing on prem hosted WCF services to Azure Service Fabric. I learnt that this could be possible by leveraging Azure Service Fabric - Reliable Service using WCF-based communication stack as described in this post - https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-wcf

       I have also referred the couple of other posts and samples to move WCF services to Azure Service Fabric. All the samples has  operation contracts with return type Task generic classes. Here is my confusion about. The WCF services what we have on prem has all the typed returned response in all the operations (e.g. ClassA<ClassAType> OperationName(string, long)). Is it mandatory to convert these typed returned response into Task generic type to host these WCF services over Azure Service Fabric. does it mean I need to convert all the operations into Task Asynchronous communication? Also these WCF services operations are decorated with FaultContracts also, do we need to make any changes in the fault exception handling implementation while we moving these services to Azure Service Fabric.

      I appreciate if you can share your response on this and sharing the solution specially if you come across similar requirement. Let me know if you need any further questions on this. Thanks.

    Hardik


    Thanks & Kind Regards, Hardik Vyas

    Friday, December 9, 2016 2:23 PM

Answers

  • Task is strongly recommended since these operations should be async. That said, I believe that this is only required if you are planning to use ServiceProxy or WCF Communication Listeners. You shouldn't be required to do it otherwise, your existing clients can work, however they would need to be modified in order to perform manual resolution of the target services - this is a bunch of code that you would have to write yourself which is why we provide those higher level APIs for you. I don't know of any changes that would be required for FaultContracts.
    Friday, December 9, 2016 7:16 PM

All replies

  • Task is strongly recommended since these operations should be async. That said, I believe that this is only required if you are planning to use ServiceProxy or WCF Communication Listeners. You shouldn't be required to do it otherwise, your existing clients can work, however they would need to be modified in order to perform manual resolution of the target services - this is a bunch of code that you would have to write yourself which is why we provide those higher level APIs for you. I don't know of any changes that would be required for FaultContracts.
    Friday, December 9, 2016 7:16 PM
  • We really need trustworthy examples of how to call legacy WCF services deployed to Service Fabric. There seems to be great confusion about how to handle this, and I'm referring to real Azure, not the one-box playground. Who can direct me to a good example of how to build the client so it lives up to all programming model requirements.
    Wednesday, October 11, 2017 8:32 PM