mercredi 26 août 2015

OWIN WEBAPI and SQLite database moving to Azure

I have an OWIN implementation of backend that hosts a set of WebApiController as a REST WEB API. These controllers use SQLite database. Now we plan to move them to Azure, probably host them in a WorkerRole and start our OWIN app in OnStart(). With a bit of research I found this approach is a common practice to host OWIN apps in Azure.

The question I have is now related to database. I want to use RoleEnvironment.GetLocalResource().Root and sync latest database with Azure blob storage on the role start. And then the OWIN app can communicate to the database from that point on. And once the role is going to be stopped, I sync back the database on local to the Azure blob storage.

Question: Is this a good practice? Any suggestion on this scenario to use SQLite in a WorkerRole?

Aucun commentaire:

Enregistrer un commentaire