On Sat, Sep 25, 2010 at 10:16:40PM +0100, Mark Fowler said:
> On Wed, Sep 22, 2010 at 5:51 PM, Simon Wistow wrote:
>
> > Redis doesn't have queues (i.e deliver to only one subscriber), it only
> > has topics (deliver to all subscribers).
>
> Can't I just BLPOP?
>
> http://code.google.com/p/redi
On Wed, Sep 22, 2010 at 5:51 PM, Simon Wistow wrote:
> Redis doesn't have queues (i.e deliver to only one subscriber), it only
> has topics (deliver to all subscribers).
Can't I just BLPOP?
http://code.google.com/p/redis/wiki/BlpopCommand
Mark.
On Wed, Sep 22, 2010 at 07:49:07AM +0100, Leon Brocard said:
> > Use a queue?
>
> ... instead of writing yet more software. A couple are:
>
> > ApacheMQ | RabbitMQ | Beanstalkd
>
> And probably also Redis. I've used all of them and would probably
> recommend Redis for something lightweight and R
On 20 September 2010 17:43, Peter Edwards wrote:
> On 20 September 2010 17:30, Roger Burton West wrote:
>
>> I wish to have two processes, a "producer" (which will create files) and
>> a "consumer"
When hearing those two words you should automatically think...
> Use a queue?
... instead of wri
When implementing the producer/consumer pattern within a file system I
use these guidelines.
Pick a directory writeable by the producer, readable by the consumer
(this method only uses one directory to avoid file system boundary
issues). Have the producer write a file with a name that matches
On Tue, 21 Sep 2010 19:07:07 +1000, Daniel Pittman wrote:
> David Alban writes:
> > On Mon, Sep 20, 2010 at 4:13 PM, Daniel Pittman
> > wrote:
> >> Just make sure it is a move, not a copy, of the file; at least
> >> one developer around me has dropped in File::Copy::move when they
> >> got a plai
If you want something in between the database functionality/requirements
of The Schwartz and manually twiddling bits on disk (with a magnet of
course - if you are lucky - when I was a lad we had to make our own
magnetism) then IPC::DirQueue implements a safe filesystem based IPC
mechanism.
I have
On Tue, Sep 21, 2010 at 09:13:19AM +1000, Daniel Pittman wrote:
> Just make sure it is a move, not a copy, of the file; at least one developer
> around me has dropped in File::Copy::move when they got a plain rename refused
> because it crossed devices ??? so ended up copying the data in anyway.
On Tue, Sep 21, 2010 at 01:20:08PM +0100, David Cantrell wrote:
>My first choice would be to just use the filesystem. Have the
>producer(s) write its files somewhere and then mv them to a directory
>that the consumer knows about once it's completely written.
OK, a bit more detail. This is a pret
On Mon, Sep 20, 2010 at 05:43:20PM +0100, Peter Edwards wrote:
> On 20 September 2010 17:30, Roger Burton West wrote:
> > I wish to have two processes, a "producer" (which will create files) and
> > a "consumer" (which will do something with them), running
> > simultaneously. Ideally the producer
David Alban writes:
That has the same failure mode: you can't rename, or hard-link, across
separate file systems. This bites if you use File::Temp, which uses /tmp, and
your target is somewhere else.
Now, a symbolic link might do it, if you didn't count on the receiver deleting
the temporary fi
On 20 September 2010 17:30, Roger Burton West wrote:
> I wish to have two processes, a "producer" (which will create files) and
> a "consumer" (which will do something with them), running
> simultaneously. Ideally the producer would push filenames to a list as
> it finishes producing them, while t
Roger Burton West wrote:
>
> I wish to have two processes, a "producer" (which will create files) and
> a "consumer" (which will do something with them), running
> simultaneously. Ideally the producer would push filenames to a list as
> it finishes producing them, while the consumer would shift th
if you do need a copy, hard linking would provide, well, not a true
copy, but something that could play one on tv. and, like a moved file
(in the same filesystem), it benefits from the "copy" springing into
existence complete.
On Mon, Sep 20, 2010 at 4:13 PM, Daniel Pittman wrote:
> Just make su
On 20/09/10 22:15, Mark Fowler wrote:
On 20 Sep 2010, at 17:30, Roger Burton West wrote:
I wish to have two processes, a "producer" (which will create files) and
a "consumer" (which will do something with them), running
simultaneously. Ideally the producer would push filenames to a list as
it
Mark Fowler writes:
> On 20 Sep 2010, at 17:30, Roger Burton West wrote:
>
>> I wish to have two processes, a "producer" (which will create files) and a
>> "consumer" (which will do something with them), running simultaneously.
>> Ideally the producer would push filenames to a list as it finishes
On Mon, Sep 20, 2010 at 10:17:28AM -0700, Randal L. Schwartz said:
> > "Peter" == Peter Edwards writes:
>
> Peter> http://search.cpan.org/perldoc?TheSchwartz
>
> I always do a doubletake when I see that module mentioned.
>
> I don't dare use it for any of my clients... they'll think I named
On Mon, Sep 20, 2010 at 10:15:58PM +0100, Mark Fowler wrote:
>I had a better thought after my last post. Have one process create
>files and, when it's done with each file, atomically move them into a
>known directory for the second process to, um, process and delete then
>when done.
Threads may we
On 20 Sep 2010, at 17:30, Roger Burton West wrote:
> I wish to have two processes, a "producer" (which will create files) and
> a "consumer" (which will do something with them), running
> simultaneously. Ideally the producer would push filenames to a list as
> it finishes producing them, while th
And I spotted this tonight
http://octobot.taco.cat/
"Supports AMQP/RabbitMQ, Beanstalk, and Redis PubSub. Others easily addable"
On Sep 20, 2010 6:51 PM, "Mark Fowler" wrote:
On 20 Sep 2010, at 17:30, Roger Burton West wrote: I
wish to have two process...
You could use threads instead of proces
On 20 Sep 2010, at 17:30, Roger Burton West wrote:
> I wish to have two processes, a "producer" (which will create files) and
> a "consumer" (which will do something with them), running
> simultaneously. Ideally the producer would push filenames to a list as
> it finishes producing them, while th
On 20 Sep 2010, at 17:30, Roger Burton West wrote:
I wish to have two processes, a "producer" (which will create files) and
a "consumer" (which will do something with them), running
simultaneously. Ideally the producer would push filenames to a list as
it finishes producing them, while the consum
> "Peter" == Peter Edwards writes:
Peter> http://search.cpan.org/perldoc?TheSchwartz
I always do a doubletake when I see that module mentioned.
I don't dare use it for any of my clients... they'll think I named it
after me. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. -
On 20 September 2010 17:30, Roger Burton West wrote:
> I wish to have two processes, a "producer" (which will create files) and
> a "consumer" (which will do something with them), running
> simultaneously. Ideally the producer would push filenames to a list as
> it finishes producing them, while
I wish to have two processes, a "producer" (which will create files) and
a "consumer" (which will do something with them), running
simultaneously. Ideally the producer would push filenames to a list as
it finishes producing them, while the consumer would shift them off the
same list (or loop-wait,
25 matches
Mail list logo