用 C# 构建网站后端,编译为二进制文件
我正在创建一个新颖的网站,该网站集成了来自互联网的网络源。我想构建一个定期对 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您想要一个按计划运行(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.