文章对如何组织背景队列操作队列、背景、操作、组织

2023-09-03 04:15:24 作者:刪除丶我的孤單

现在我正在考虑如何组织系统的体系结构。该系统将包括网站,在这里用户可以上传一些文件,然后把它处理回用和任务,应该进程提供文档的队列中的一些后台守护进程的。

Now I'm thinking about how to organize architecture of system. The system will consists of web site, where user can upload some documents and then get it processed back and a some background daemon with an queue of tasks that should process provided documents.

我的问题是: 我应该实现守护我告诉你上面,因为只有命名管道的WCF服务(没有网络计获得所需要这项服务)?

My question is: Should I implement the daemon I told you above, as a WCF service with only named pipes (no netowork access to this service needed)?

上任何建议/提示/意见?

Any suggestions/tips/advices on that?

中的数据用户可以提供的只是一堆的XML文件。 ASP.NET网站将公开功能得到这个XML文件,然后以某种方式应该能够将它们传递给后台程序。

The data user can provide is just a bunch of XML files. ASP.NET web site will expose functionality to get this XML files and then somehow should be able to pass them to daemon.

你能指出我请对这个话题的文章。 在此先感谢!

Could you point me please on some articles on that topic. Thanks in advance!

几个小时后发现MSMQ建议这里由家伙,我的想法对这种技术是关于则多为分布式架构(处理节点分别位于不同的机器,并没有通过网络交换型动物计算机之间的消息)。

After some hours discovering MSMQ suggested here by guys, my thought on that technology is about that is more for distributed architecture (processing nodes are located on separate machines and there is exchanging messages between differents computers through network).

目前的瞬间分离到独立的机器是不需要的。会有只是在机器上是一个ASP.NET网站和一些处理程序。

At the moment separating to independent machines is not needed. There will be just on machine on which being an ASP.NET website and some processing program.

时,使用MSMQ因此有必要吗?

Is that using of MSMQ so necessary?

由于我使用的.NET Framework在这里,请表明不仅提供了什么是.NET兼容。实在是没有任何选择这里。

As I using .NET Framework here, please suggest only offers what are compatible for .NET. There is really no any options here.

推荐答案

我设计了类似的东西。我们使用WCF服务作为连接点,然后针对的RabbitMQ排队的消息。然后,一个单独的服务工作,在队列中的项目,当任务完成的话,因此在完成WCF调用(WCF已经处理这么多的内置功能)

I've designed something similar. We used a WCF service as the connection point, then RabbitMQ for queuing up the messages. Then, a separate service works with items in the queue, sending async callback when the task if finished, therefore finishing the WCF call (WCF has many built in features for dealing with this)

您可以设置超时每边,或者你甚至可以选择丢弃WCF连接,并使用异步回调,以通知处理完毕用户 我有更好的运气与RabbitMQ的比MSMQ,仅供参考。

You can setup timeouts on each side, or you can even choose to drop the WCF connection and use the async callback to notify the user that "processing is finished" I had much better luck with RabbitMQ than MSMQ, FYI.

我没有给你任何链接,因为这是一些我们的团队想出了,并一直行之有效(1000 TPS有4服务器池,100%无状态) - 只是一个想法

I don't have any links for you, as this is something our team came up with and has worked very well (1000 TPS with a 4 server pool, 100% stateless) - Just an Idea.