Perl 的排队系统 [英] A queueing system for Perl

查看:61
本文介绍了Perl 的排队系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Perl 项目,该项目需要一个 FIFO 消息队列,以便在一台机器 (UNIX) 上的多个进程之间分配任务.队列大小可能会增长到 100 万个作业.

I'm working on a Perl project which needs a FIFO message queue for distributing tasks between several processes on a single machine (UNIX). The queue size may grow up to 1M jobs.

我试过 IPC::DirQueue,但它变成了有 50k 左右的工作排队,速度非常慢.可以在 Perl 中使用的这个模块有哪些好的替代方案?

I've tried IPC::DirQueue, but it becomes awfully slow with 50k or so jobs enqueued. What are good alternatives to this module which can be used in Perl?

推荐答案

我在使用 ZeroMQ 解决此类问题方面取得了相当大的成功,无论是 Perl 还是其他语言.

I've had pretty good success with using ZeroMQ for this sort of problem, both with Perl and other languages.

根据我的经验,ZeroMQ 模块似乎是目前 Perl 最可靠的绑定.

In my experience, the ZeroMQ module appears to be the most reliable binding for Perl currently.

这篇关于Perl 的排队系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆