0
votes

I have actor system with data flow route depending on passed data.

Now I want to extract common pieces of code from actors and introduce states.

Like if I want to build video with audio - then either on "ffmpeg" state I have to wait for both messages from "PhantomJS" and "Audio", and on Amazon S3 -"PhantomJS" and "FFMPEG" arrived. But for other data sets (just video or just audio) it can simply pass through. States may be governed by several actors.

In the very past I worked with OSWorkflow project, which seems to be dead now. I looked at Akka FSM and Twitter Storm, both seem to solve my problem, but perhaps I need some opinions.

1

1 Answers

1
votes

Not sure what you are actually asking for but to me ..
In a storm like environment these sources like Video, Preview, Audio could act as a Spout subscribed to a message queue like Kafka or kestrel. PhantomJS on the other hand could play the role of a Bolt subscribed to different spouts (Video, Preview). Same goes with the other components (ffmpeg, S3).

I have to wait for both messages from "PhantomJS" and "Audio", and on Amazon S3 -"PhantomJS" and "FFMPEG" arrived.

Is this a kind of stream joining you are looking for ? Check out this doc that says

A streaming join combines two or more data streams together based on some common field. Whereas a normal database join has finite input and clear semantics for a join, a streaming join has infinite input and unclear semantics for what a join should be.

Storm trident also provides a very efficient ways of merging . Its as simple as topology.merge(stream1, stream2, stream3);
You could probably look futher on this, hope this helps