azure service fabric sample
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ServiceFabricTriggerSolution
.gitattributes
.gitignore
LICENSE
README.md

README.md

azure-servicefabric-sample

Introduction

This repository is aimed to hold Azure Service Fabric related samples.
Azure Service Fabric Servies can be configured to exhibit trigger based bahvior similar to WebJobs and Azure Functions. Have added a code samples to exhibit such behavior (Detailed below).

Solutions

Time triggered / Scheduler Service in Azure Service Fabric (ServiceFabricTriggerSolution)

To create a time triggered (scheduler) Service in Azure Service Fabric, I can think of following two quick options among the possible ways.

  1. Create a time triggered WebJob and add/deploy it as a guest executable in Azure Service Fabric.
  2. Create Azure Service Fabric Stateless Service and implement the listener to handle jobs.

Here I'm taking the second approach which involves the respective listener to be created. Rather than writing new Scheduling framework, I'm using the Quartz.Net framework. I'm using the CRON expression behavior to have the behavior inline with the time trigger behavior of WebJobs and Azure Functions.

SimpleTimeTriggerService
  • Uses Quartz.Net framework.
  • Without Dependency Injection.
  • Listerner gets all the IJob types from the current assembly with JobInfoAttribute decorated.
  • JobInfoAttribute holds the name and CRON expression of the job.
TimeTriggerService