You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Klausen Schaefersinho <kl...@gmail.com> on 2014/03/07 10:35:18 UTC

Synchronization

Hi,

I have an topology where I have a really long running task in one bolt,
lets call it A. This bolt is triggered by some other bolt B every 100k
events or so. However the processing can take very long, so I would not
want B to trigger A if it is not done.  Is there any best practice to
synchronize the bolts?

As an Alternative I could image Bolt A sleeping for some time and then
doing his work and sleeping again. Is there any confy way how I could build
this in storm without relying on Threads and sleeps?

Cheers,

KLaus

Re: Synchronization

Posted by Andrew Perepelytsya <ap...@hortonworks.com>.
Take a look at https://github.com/ptgoetz/storm-signals , it's using
ZooKeeper under the hood.


On Fri, Mar 7, 2014 at 4:38 AM, James Xu <xu...@gmail.com> wrote:

> A can send a message to B: “I am ready!”
> B only trigger A when A is ready.
>
> On 2014年3月7日, at 下午5:35, Klausen Schaefersinho <kl...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I have an topology where I have a really long running task in one bolt,
> lets call it A. This bolt is triggered by some other bolt B every 100k
> events or so. However the processing can take very long, so I would not
> want B to trigger A if it is not done.  Is there any best practice to
> synchronize the bolts?
> >
> > As an Alternative I could image Bolt A sleeping for some time and then
> doing his work and sleeping again. Is there any confy way how I could build
> this in storm without relying on Threads and sleeps?
> >
> > Cheers,
> >
> > KLaus
>
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Re: Synchronization

Posted by James Xu <xu...@gmail.com>.
A can send a message to B: “I am ready!”
B only trigger A when A is ready.

On 2014年3月7日, at 下午5:35, Klausen Schaefersinho <kl...@gmail.com> wrote:

> Hi,
> 
> I have an topology where I have a really long running task in one bolt, lets call it A. This bolt is triggered by some other bolt B every 100k events or so. However the processing can take very long, so I would not want B to trigger A if it is not done.  Is there any best practice to synchronize the bolts?
> 
> As an Alternative I could image Bolt A sleeping for some time and then doing his work and sleeping again. Is there any confy way how I could build this in storm without relying on Threads and sleeps?
> 
> Cheers,
> 
> KLaus