You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Stepan Urban <st...@gmail.com> on 2017/12/06 12:31:29 UTC

Swing or JavaFX GUI in Storm Bolt

Hello,
is it possible to use java Swing or JavaFX GUI in bolt? I need user
interaction with bolt. In local mode there is no problem but how to solve
it eg. on a single computer in cluster mode?

Thanks
Stepan

RE: Swing or JavaFX GUI in Storm Bolt

Posted by Mauro Giusti <ma...@microsoft.com>.
Storm is designed to run as a backend process, without user interaction –
Messages have to be processed within a specific time or they “fail” or “timeout”, not a good premise for waiting for user input –

One option to consider is pushing the data that needs user interaction from your bolt to a Kafka queue and then use a UI app to perform user interaction – data can return to Kafka on a different queue once cleared and then another Storm topology can take that over and complete the flow -

HTH,
Mauro.

From: Stepan Urban [mailto:stepann.urban@gmail.com]
Sent: Wednesday, December 6, 2017 4:31 AM
To: user@storm.apache.org
Subject: Swing or JavaFX GUI in Storm Bolt

Hello,
is it possible to use java Swing or JavaFX GUI in bolt? I need user interaction with bolt. In local mode there is no problem but how to solve it eg. on a single computer in cluster mode?
Thanks
Stepan

Re: Swing or JavaFX GUI in Storm Bolt

Posted by Stephen Powis <sp...@salesforce.com>.
So you want a way to signal into a running topology to alter its behavior?
This may be what you're looking for if so:

https://github.com/ptgoetz/storm-signals



On Mon, Dec 11, 2017 at 5:38 PM, Stepan Urban <st...@gmail.com>
wrote:

> Hi Bobby,
> thanks for replay. I do not want to ask user for a question about each
> tuple. I want to change some tresholds, trun on/off processing of some part
> of the topology. For example when debugging I want to compute much more
> numbers than during normal run. Next I can define some control spout/bolt
> which can send control tuples. Eg. in GUI I need to have a calendar in
> which I can set during which days/hours it shoul process specific tuples.
> This control bolt than can send control tuple to all bolts processing
> tuples. Is this architecture wrong? Can I solve it in different way?
>
> Stepan
>
> 2017-12-06 15:58 GMT+01:00 Bobby Evans <bo...@apache.org>:
>
>> Storm is not designed for this type of use case.  Storm is set up for
>> distributed processing on multiple nodes. A GUI running inside a bolt is
>> not something we really ever thought about.  If you need to interact with a
>> user typically you will have some external state store, like a SQL DB or
>> Zookeeper.  The bolt and the GUI can interact with each other over that,
>> but it should not be blocking.  Asking a user a question about each tuple
>> that needs to be processed is not going to really work in storm, not sure
>> if you are doing this or not.  What I have seen work are people that want
>> to trigger things in their topology like fail out of coloA for storing
>> results for the next 5 hours.
>>
>> - Bobby
>>
>>
>> On Wed, Dec 6, 2017 at 6:31 AM Stepan Urban <st...@gmail.com>
>> wrote:
>>
>>> Hello,
>>> is it possible to use java Swing or JavaFX GUI in bolt? I need user
>>> interaction with bolt. In local mode there is no problem but how to solve
>>> it eg. on a single computer in cluster mode?
>>>
>>> Thanks
>>> Stepan
>>>
>>
>

Re: Swing or JavaFX GUI in Storm Bolt

Posted by Stepan Urban <st...@gmail.com>.
Hi Bobby,
thanks for replay. I do not want to ask user for a question about each
tuple. I want to change some tresholds, trun on/off processing of some part
of the topology. For example when debugging I want to compute much more
numbers than during normal run. Next I can define some control spout/bolt
which can send control tuples. Eg. in GUI I need to have a calendar in
which I can set during which days/hours it shoul process specific tuples.
This control bolt than can send control tuple to all bolts processing
tuples. Is this architecture wrong? Can I solve it in different way?

Stepan

2017-12-06 15:58 GMT+01:00 Bobby Evans <bo...@apache.org>:

> Storm is not designed for this type of use case.  Storm is set up for
> distributed processing on multiple nodes. A GUI running inside a bolt is
> not something we really ever thought about.  If you need to interact with a
> user typically you will have some external state store, like a SQL DB or
> Zookeeper.  The bolt and the GUI can interact with each other over that,
> but it should not be blocking.  Asking a user a question about each tuple
> that needs to be processed is not going to really work in storm, not sure
> if you are doing this or not.  What I have seen work are people that want
> to trigger things in their topology like fail out of coloA for storing
> results for the next 5 hours.
>
> - Bobby
>
>
> On Wed, Dec 6, 2017 at 6:31 AM Stepan Urban <st...@gmail.com>
> wrote:
>
>> Hello,
>> is it possible to use java Swing or JavaFX GUI in bolt? I need user
>> interaction with bolt. In local mode there is no problem but how to solve
>> it eg. on a single computer in cluster mode?
>>
>> Thanks
>> Stepan
>>
>

Re: Swing or JavaFX GUI in Storm Bolt

Posted by Bobby Evans <bo...@apache.org>.
Storm is not designed for this type of use case.  Storm is set up for
distributed processing on multiple nodes. A GUI running inside a bolt is
not something we really ever thought about.  If you need to interact with a
user typically you will have some external state store, like a SQL DB or
Zookeeper.  The bolt and the GUI can interact with each other over that,
but it should not be blocking.  Asking a user a question about each tuple
that needs to be processed is not going to really work in storm, not sure
if you are doing this or not.  What I have seen work are people that want
to trigger things in their topology like fail out of coloA for storing
results for the next 5 hours.

- Bobby

On Wed, Dec 6, 2017 at 6:31 AM Stepan Urban <st...@gmail.com> wrote:

> Hello,
> is it possible to use java Swing or JavaFX GUI in bolt? I need user
> interaction with bolt. In local mode there is no problem but how to solve
> it eg. on a single computer in cluster mode?
>
> Thanks
> Stepan
>