yuzd / Hangfire.HttpJob

httpjob for Hangfire,restful api for Hangfire,job调度与业务分离
https://github.com/yuzd/Hangfire.HttpJob/wiki
MIT License
630 stars 186 forks source link

About Agent Persistence #194

Open ianido opened 1 year ago

ianido commented 1 year ago

Hello, I started using your package to connect to a centralized Hangfire Server by http, however I do not understand the concept of Agent and their Persistence (mssql, redis and mysql), Why Agent needs direct access to the hangfire database? What is the difference between having an agent and simply using the hangfire clases?

yuzd commented 1 year ago

Agent Can be disassembled into different applications according to business lines In this way, different business lines can write jobs in their own applications

Why Agent needs direct access to the hangfire database? It is because the status and execution log of the job need to be synchronized to hangfireserver For example, unified management in hangfire dashboard

By the way It may be better to switch to communication between agent and hangfireserver How do you think?

ianido commented 1 year ago

Thank you for your answer, I am still not sure what is the difference in between having an Agent in a windows console and having a windows console with hangfire server, I can have as many servers as I want, I can define a server looking at specific queue as well.

Not sure which scenario is covered by Agents specifically than a regular hangfire server app can't cover?

yuzd commented 5 months ago

From a design perspective, I think the Hangfire.httpjob,agent interacting directly with storage is a bad design, and it would be better to change it to interact with hangfireserver. At first, I wanted to make the agent's status and logs unified and manageable in hangfire.dashbord. At that time, I just designed it like this for convenience.

ianido commented 5 months ago

100% agrees

maxiar commented 1 month ago

Hi! any Plan to improbe this to isolate the hangfire database from agents ? .. :) I can help us if you think any design..