用 C# 构建网站后端,编译为二进制文件

发布于 2024-08-13 11:05:59 字数 187 浏览 3 评论 0原文

我正在创建一个新颖的网站,该网站集成了来自互联网的网络源。我想构建一个定期对 Web 数据进行 CPU 密集型分析的后端,最终将结果不断添加到数据库中。

网站可以通过普通的 asp.net 后端访问该数据库,该后端将页面服务器提供给客户端。

在服务器上持续运行的 C# 二进制文件中构建复杂的 CPU 操作是否是可取且最佳实践?

I am creating a novel website that integrates web feeds from around the internet. I want to build a backend that does CPU intensive analysis of the web data on a regular basis, which will eventually add the results continuously into a database.

This database will be accessable by the website through a normal asp.net backend that will server the page up to the client.

Is it advisable, and best practice, to build the complex CPU operations in c# binaries that run continuously on the server?

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

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

发布评论

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

评论(1

も星光 2024-08-20 11:05:59

听起来您想要一个按计划运行(cronjob 样式)或自行计划的 .NET 可执行文件。无论如何,将其完全独立于您的网站流程是明智的。听起来数据生成和数据服务是不同的问题,因此它们应该分开。这也意味着如果负载出现问题,您可以将其从网络服务计算机上移走。如果您要更新实时数据库,请记住考虑事务。

Sounds like you want a .NET executable that either runs on a schedule (cronjob-style) or that schedules itself. In any case it's wise to have it completely separate to your website process. It sounds like data-generation and data-serving are separate concerns, so they should be kept separate. This also means that you can move it off the web-serving machine if load becomes an issue. If you're updating a live database remember to take transactions into account.

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