【发布时间】:2014-01-03 08:42:40
【问题描述】:
简单地说,在什么用例中,最好让许多进程从队列中取出一条消息并按顺序完成针对该作业的许多任务,或者让许多任务/进程从队列中取出 1 条消息并完成针对它的任务.
我有一份工作要排队。清洗我的衣物。
我能做到……
[option A]
Clean My Laundry -----> Wash it
then, Store Transaction
then, Tell ppl i'm washing
then, write a blog about it
OR
[option B]
Clean My Laundry ------> Wash it
------> Store Transaction
------> Tell ppl i'm washing
------> write a blog about it
任务的顺序无关紧要。他们只需要完成。我了解它们是否相互依赖,请将它们分组。
对分布式进程进行分组或不分组的优点或缺点是什么?
感谢您的任何贡献。
【问题讨论】:
-
您在寻找什么样的优势或劣势?通常并发是出于性能或响应性的原因。
-
我只是想知道为什么选择 a 和 b 选项?
标签: scala haskell heroku concurrency erlang