Search code examples
azureasp.net-web-apiazure-service-fabric

Service Fabric component usability based on Requirement


We have an requirement to invoke the Third party API(Yodlee) through Fabric service. It is Connecting Existing bank with yodlee service to get their Transaction.

Here, to connect the yodlee, need to maintain the Token (30 min Expire) for all api invoking with header.

Please suggest the which component would use to match the scenario.

Approach 1:

Stateless WebApi (EndPoint) -> Stateful Service (to maintain the state (Token) for all Node.

Approach 2:

Stateless WebApi (EndPoint) -> Stateful Actor (to maintain the state (Token)

Approach 3:

Is there a way to crate the stateful service with Webapi

Approach 4:

Service bus -> Stateful service


Solution

  • Approach 2. Using an Actor is a simple way to store a token for a user. Use a Reminder to invalidate or refresh the token after expiry.

    Maybe you can use the Actor as a proxy to Yodlee, by putting the Authentication/Autorization/GetTransaction calls inside it.