I am a novice to hangfire and I have several questions which really confuse me at the moment.
(1)multiple server issue
Currently I am using MVC3 as the development tool, and I started BackgrondJobServer in HangfireBootstrapper.Instance.Start() call which is invoked by Application_Start in Global.aspx file. offcourse I just instantiated one BackgroundJobServer. My question is what if I instantiate two or more servers, how the server information is stored?Are they also stored in hangfire database? When two or more servers exists and connects to the same database, is there a chance that one job will be scheduled twice?If not, how does hangfire avoid such situation?
(2)how is the job saved in the database and how is the job started?
I have viewed the database structure of hangfire and found that the job detail actually is stored in the tables, which include much information. So I guess when the job is about to be executed, the server will use reflection mechanism of .net to invoke the function. Is my guess accurate?
(3)issues related with separate server
hangfire makes it possible to separate hangfire server process from the application server process. for example, we can use windows service to host the hangfire server process. however, when the server program is running(scheduling execution of jobs), will the server run normally? I am wondering the example shown in the manual guide, the code is simple. it just instantiates the BackgoundJobServer instance, and nothing else. but the actual job requires concrete function details, do I have to include the specific dll files into the separate server solution?If not, how could hangfire server program invoke the job execution?
(4)dashboard problem when separate hangfire server process from the main iis process
as section(3) mentioned above, we could have a separate hangfire server process, could we still use iis to display hangfire dashboard? In this case, we just do not use iis server as the hangfire BackgroundJobServer, do we?
Expecting professionals to explain for me.