WCF Communication and Swagger options for an Service Fabric-hosted API?


i doing research , playing around in sandboxes potential project.

i want use azure sf host api, reliability , scalability.

because api "parameter heavy" , use complex datatypes, steering away restful implementation. think wcf better fit.

however, client-side code generation options come with swagger, use that. have looked swagger wcf open source project, and, if works make fit.

with above in mind, have these questions:

(1) looking @ wcf documentation azure service fabric @ link: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-wcf

they show example code wcf service interface:

[servicecontract]public interface icalculator{    [operationcontract]    task<int> add(int value1, int value2);}

(a) requirement to use task<t> return type service operations when developing wcf inside service fabric?

in traditional wcf, use own classes (decorated appropriate serialization attributes) return types; option in service fabric?

(b) if requirement use task<t>, implications using swagger? assume swagger depend upon ability serialize task<t>, , not sure if going practical, , whether going reasonably "clean" results swagger if go down road?

(2) in same documentation, there snippet , code example, talking wcf communication client-side:

"for writing clients communicate services using wcf, framework provides wcfclientcommunicationfactory, wcf-specific implementation of clientcommunicationfactorybase"

what if want use client-side communication stack more web-centric, such wsdl? possible expose a wsdl endpoint wcf service fabric service, , if so, how done?

robert, interesting know kind of clients want support (.net? javascript? node? go?) , on platforms.

i'd if .net-only clients, wcf choice. if not, still possible use wcf, might spend more time on plumbing between clients , service planned for.

the devil in details, in general service fabric not place particular restrictions on type of wcf service can host. wcfclientcommunicationfactory , related classes there deal issues of discovering primary replica endpoints, dealing replicas being migrated different nodes in cluster, retrying communication upon transient failures , like.



Microsoft Azure  >  Azure Service Fabric



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to send non-standard Content-Type header ?