Search code examples
c#serviceregistrymicroservicesazure-service-fabric

Migrating existing Windows service to Service Fabric


Recently, I have encountered an issue where I want to make my existing Windows service to run in a SF cluster. However, this service does some registry operations, and it is dependent on it.

At SF, this is meaningless (as the service can be shutdown and re-run on another node). What are my options to make a smooth transition? Use DB instead of a registry? Any other ideas (as in some cases the service stores data in the registry in case an error will occur in DB)?


Solution

  • You could just create a Stateful service for this. The Service would store the (registry) values in a reliable dictionary. This way the state would always be available to the service.