Implementing a Queue in a process
Dirk Koopman
djk at tobit.co.uk
Tue Nov 22 12:23:15 GMT 2011
On 22/11/11 07:16, Shantanu Bhadoria wrote:
>
> - How to implement this queue in a perl process. (remote shared
> Database:mysql?, internal data structure, local SQLite?)
> - How do I push new tasks into this queue ( i.e. interprocess
> communication, Simpler(uglier) for a shared database, but I would prefer a
> process like that to sit in isolation and accept requests and manage them
> on its own so whats the ideal inter-process communication format for
> it?named pipes?).
>
>
> I would really love to know your opinions on the best way to do it. The
> straightforward but ugly way to do this would probably be putting tasks
> into a database and have the other process ping the database for new tasks
> in queue every second. But I believe there has gotta be a better way to do
> it and what better place to figure it out then ask you folks. :)
> So what do you guys think is the best implementation for such a requirement?
>
Now is your chance to use AnyEvent and Json. That is what I do these
days. I used to use my own message handling stuff, but these are better
and much faster.
Dirk
More information about the london.pm
mailing list