由守护进程提供的web服务的最佳方法

时间:2022-07-05 12:15:20

I am relatively new to web services and am wondering what the standard "best approach" is. Basically, the way things work is I need to have a task running the background constantly.

我对web服务比较陌生,我想知道什么是标准的“最佳方法”。基本上,事情的运作方式是我需要有一个持续运行后台的任务。

The the web service will connect to the daemon and return with an appropriate response. Currently, the communication is over unix domain sockets (Linux is the expected server platform).

web服务将连接到守护进程并返回适当的响应。目前,通信是通过unix域套接字(Linux是预期的服务器平台)进行的。

Is this the "right" way to do this? Or is there a more proper way to have a background task that your web-server is based on?

这是正确的做法吗?或者有更合适的方法让你的web服务器基于一个后台任务?

1 个解决方案

#1


3  

That's pretty much the best practice. You may be familiar with this pattern from other web applications: The daemon is frequently a database. :)

这是最好的做法。您可能在其他web应用程序中熟悉这个模式:守护进程通常是一个数据库。:)

#1


3  

That's pretty much the best practice. You may be familiar with this pattern from other web applications: The daemon is frequently a database. :)

这是最好的做法。您可能在其他web应用程序中熟悉这个模式:守护进程通常是一个数据库。:)