从 Web 应用程序请求创建单独的进程

发布于 2025-01-07 12:57:49 字数 149 浏览 0 评论 0原文

一位客户向我请求拥有一个在后端进行大量处理(从文件读取、写入 Web 服务)的 Web 应用程序。我的问题是,由于这个“过程”(当用户单击“开始”时)可能需要几个小时,我该如何做才能在用户关闭网页后继续处理?如果这没有任何意义,请告诉我,我可以提供更多信息。任何帮助将不胜感激,谢谢!

A client came to me with a request to have a web app that does a lot of processing in the backend (reads from a file, writes to a web service). My question is that since this "process" (when the user clicks 'Go') may take hours, how do I make it so the processing continues after the user closes the web page? Please let me know if this does not make any sense and I can give more information. Any help would be greatly appreciated, thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

逆流 2025-01-14 12:57:49

您必须为其创建 MS Windows 服务。

您已经为该服务提供了一些数据库表,客户端将通过您的网站功能使用该数据库表。

You have to create MS Windows Service for it.

You have provide for that Service some database table which client is going to use by your Website functionality.

慕烟庭风 2025-01-14 12:57:49

这基本上是一个“批处理作业”要求,这就是我建议您实现它的方式。

客户端将使用网页,不是为了执行工作,而是管理正在执行工作的批处理作业列表。调度它们、启动或停止它们、查看它们的状态和电流输出等。 (是的,就像他们在 1970 年代所做的那样,但没有“//FOOBAR JOB (123,456)”...感谢上帝。

用户转到网页并输入请求。A主机上的后端服务进程(批处理作业管理器...)现在可能在一台计算机上启动作业;同时,用户可以注销网站并执行任何操作。那么,他愿意。可以随时返回,返回到作业监控网页,看看情况如何 停止作业、暂停/恢复等等。

很多。批处理作业监控工具已经存在,适用于各种环境,无论是免费的还是商业的,因此,您不必构建所有这些东西;您只需识别。 em> 哪种现成的软件包效果最好为您和您的客户。

This is, basically, a "batch job" requirement, and that's how I suggest that you approach it.

The client would use the web-page, not to perform the work, but rather to manage the list of batch jobs that are performing the work .. scheduling them, starting or stopping them, viewing their status and current output, and so on. (Yup, just like they did it in the 1970's, but without "//FOOBAR JOB (123,456)" ... thank god.

The user goes to the web-page and enters a request. A back-end service process on the host (the batch job manager...) now starts the job, perhaps on one computer; perhaps on several at a time. The user can, meanwhile, log off the web-site and do whatever he pleases. Then, he can come back at any time, go back to whatever the job-monitoring web page may be, and see how things are going. Stop the job, suspend/resume, what have you.

There are lots of batch-job monitoring tools out there already, for all sorts of environments, both free and commercial. So, it's not like you have to build all this stuff; you merely have to identify what off-the-shelf package works best for you and for your client.

锦爱 2025-01-14 12:57:49

最好的解决方案是在 Windows 服务中完成工作,并使用您的 Web 应用程序来触发处理。

The best possible solution will be to do the work in a windows service, and use your web app just to trigger the processing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文