可靠(耐用)的分布式日志引擎
试图为分布式系统找到一个商业日志框架。该框架必须允许远程服务器上的 .NET 应用程序记录消息,然后将这些消息收集到中央位置。如果可能,中央位置应将消息存储在 SQL Server 数据库中。
要求:
- 即使网络中断导致无法立即将消息分派到中央位置,也能够在远程服务器上启动消息记录。
- 向中央位置发送消息应该由运行 .NET 应用程序的进程以外的进程来处理,以防止 ASP.NET 应用程序或 Web 服务的性能下降。
- 确保消息最终传送到中央位置。例如,如果远程服务器在网络没有响应的一段时间即将结束时重新启动,则当远程服务器和正常网络条件恢复时,仍应传送记录的消息。
Trying to find a commercial logging framework for distributed systems. This framework must allow .NET applications on a Remote Server to log messages which can then be collected in a Central Location. If possible the Central Location should store messages in a SQL Server database.
Requirements:
- Be able to initiate the logging of messages on the Remote Server, even when network disruptions prevent immediate dispatching of the message to the Central Location.
- Dispatching of messages to the Central Location should be handled by a process other than the one running the .NET application, to prevent any decrease in the performance of ASP.NET applications or web services.
- Assured eventual delivery of messages to the Central Location. e.g. In the event of the Remote Server rebooting toward the end of a period when the network is not responsive, logged messages should still be delivered when the Remote Server and normal network conditions are restored.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许一个非常简单的解决方案是继续写入本地日志并创建一个单独的进程来将日志重新发布到服务器。您可以使用多种选项来发布日志,包括发布订阅消息总线,例如 MassTransit 或 msmq。
使用不同的解决方案(例如编写特定的 log4net 适配器)绝对是一种选择,但它可能会引发耦合/依赖问题,因此采用必须考虑实际的部署环境。
Probably a really simple solution can be to continue writing local logs and create a separate process for republish the log to a server. You can pubhish log using several options including a publish subscribe message bus like MassTransit, or msmq.
Using a different solution like writing a specific log4net adapter is definitely an option but it may incur in coupling / dependencies problems, so adoption must consider the actual deployement environment.
我认为您应该能够使用 Microsoft Enterprise Library 和开箱即用的 MSMQ 来完成此操作。 Entlib Logging 应用程序块有一个内置的 MSMQ 侦听器。虽然我们在几个项目中使用了 Entlib 日志记录,但我个人还没有使用过 MSMQ 分发服务。
http://msdn.microsoft.com/en-us/library/dd203267。 ASPX
I think you should be able to do this using Microsoft Enterprise Library and MSMQ out of the box. The Entlib Logging application block has a built in MSMQ listener. While we have used Entlib logging on several projects, I have not personally used the MSMQ distributor service.
http://msdn.microsoft.com/en-us/library/dd203267.aspx
log4net 是选择。它是线程安全。
log4net is the choice. It is thread-safe.