Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition exposure to Application Extensions #44

Open
smudge202 opened this issue Apr 16, 2015 · 2 comments
Open

Transition exposure to Application Extensions #44

smudge202 opened this issue Apr 16, 2015 · 2 comments
Labels
Milestone

Comments

@smudge202
Copy link
Collaborator

Transitional, Snapshot, and Restore functionality is provided for hosts utilising Compose applications. This same functionality is available to an Applciation Extension also which will have access to the Application class. However, unlike the host, the application extension is not aware if services were added AsTransitional, and has no real way of testing for this outside of attempting to resolve an ITransition<TService>.

I highly recommend against attempting to resolve an ITransition, to the point I'd be tempted to split ITransition into two interfaces; one used by consumers to create custom implementations, and then an internal wrapper used by Compose to manage and resolve the dynamic types (currently same interface is used for both usages).

I digress; I think some bool members on the application class would prove very useful for application extensions. It would allow the application to configure fallbacks and take responsibility of fault tolerance, which I believe should be the responsibility of the application itself, not the host?

The application could of course expose some of this behaviour and/or make it configurable through IOptions so that Hosts can make changes, but likely the same fault tolerance defaults (settings/implementations) would be used across all hosts.

@smudge202
Copy link
Collaborator Author

//CC @sblackler ; this one plays into remoting slightly, so I'd be keen to hear your thoughts also.

@smudge202
Copy link
Collaborator Author

Let's discuss this using the following scenario:

Alex has created an application that creates a number of files. He's chosen to use Bob's persistence provider as a default in his application extension, which saves the files to the local hard disk.

Charlie like Alex's application, and creates a worker role host for the Application that runs in Azure Cloud. It's not favourable to save files to disks, so Charlie overrides the persistence behaviour using Dylan's Azure Blob provider.

Charlie want's to utilise the Transitional behaviour of Compose in order to save files to the local hard disk (with Bob's provider) if Azure Blob's becomes unavailable, with the intention of switching back to the Blob provider when Azure starts behaving again.

I think, the questions are:

  1. Which component is responsible for saying whether a persistence provider is available/unavailable (fault tolerance)?
  2. Which component is responsible for handling services becoming unavailable and performing/configuring the transitions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant