alternative to polling database?

前端 未结 4 1860
花落未央
花落未央 2021-02-06 16:41

I have an application that works as follows: Linux machines generate 28 different types of letter to customers. The letters must be sent in .docx (Microsoft Word format). A secr

4条回答
  •  伪装坚强ぢ
    2021-02-06 17:20

    A message queue might work well, as they're usually setup to be able to block for a while without wasting resources. But with MySQL, I don't think that's an option.

    If you just want to reduce load on the DB, you could create a table with a single row: the latest job ID. Then clients just need to compare that to their last ID to see if they need to run a full poll against the real table. This way the overhead should be greatly reduced, if it's an issue now.

提交回复
热议问题