New at Hangfire

Hi all

I’m new at hangfire and I have few questions

  1. In what way hangfire writes jobs to DB, is during the process the table is locked or its non locked execution?
  2. Jobs table has a job id value is it possible to change it to bigInt instead of int?
    3 I want to implement the hangfire server as a windows service but then the dashboard wont be work as it should be as a web app? am I right?

Thanks
You are doing a good job

  1. That depends on your DB, or more accurately the DB and how the storage module is coded. Hangfire supports multiple different DB flavors so you would have to be more precise on which storage module you are looking at (and probably, since some are written by others, confer with the relevant authors).
  2. Here I am a guessing this is also (fairly new myself) related to the storage module, for instance I use MongoDB and job id’s there are (i think, at home so can’t doublecheck) are the mongo ObjectID unique keys (each record, or better bson document, in a mongo DB has a unique ObjectID generated automatically). So again this looks to be part of the storage module functions and thus depends on which you use.
  3. Yes you can, in fact that is what I did myself. I have 1 windows service that is dedicated to ‘running’ the dashboard and does not itself process jobs. Since the whole thing uses Owin running a so-called selfhosted version is not an issue. There are even guides on how to do this in detail (using topshelf as the windows service framework).

On #3, this is what i am doing too. I have a Web App that runs the dashboard and can create/queue jobs, but it does not actually process any of the work. That is done on several app servers running in a Windows Service. As long as the things you want to run/control all point to the same job store, it’ll all work seamlessly.