How to run multiple StreamBase v10 engine processes that exchange tuples
book
Article ID: KB0082963
calendar_today
Updated On:
Description
In some cases, you might want to run separate StreamBase applications, each being run in its own independent process, but still have the ability to exchange tuples.
Resolution
You must use different StreamBase Engine HOCON configuration files for each application you wish to be run in its own process. This means each application is placed in its own unique EvenFlow Fragment project. These projects are then used as dependencies for the main Deployment Application project.
Each EventFlow Fragment project contains two primary configuration files:
- A StreamBase Client API Listener file to specify different tcp ports for each application
- A StreamBase Engine file to specify container names and container connections to link the streams that exchange tuples.
A set of example projects is attached, and can be run using the following commands:
- epadmin install node application=../deployApp-0.0.1-SNAPSHOT-ep-application.zip nodename=A.sb10
- epadmin servicename=A.sb10 start node
- epadmin servicename=A.sb10 display container
[A.sb10] Engine = default-engine-for-com.example.upstream
[A.sb10] Path = upstream
[A.sb10] Type = NORMAL
[A.sb10] Enqueue = ENABLED
[A.sb10] Dequeue = ENABLED
[A.sb10] State = RUNNING
[A.sb10] Input Streams = InputStream
[A.sb10] Output Streams = OutputStream
[A.sb10] Modules =
[A.sb10] Engine = default-engine-for-com.example.downstream
[A.sb10] Path = downstream
[A.sb10] Type = NORMAL
[A.sb10] Enqueue = ENABLED
[A.sb10] Dequeue = ENABLED
[A.sb10] State = INITIALIZED // N.B. container started suspended
[A.sb10] Input Streams = InputStream
[A.sb10] Output Streams = OutputStream
[A.sb10] Modules = - epadmin servicename=A.sb10 resume container name=downstream
[A.sb10] Engine = default-engine-for-com.example.upstream
[A.sb10] Path = upstream
[A.sb10] Type = NORMAL
[A.sb10] Enqueue = ENABLED
[A.sb10] Dequeue = ENABLED
[A.sb10] State = RUNNING
[A.sb10] Input Streams = InputStream
[A.sb10] Output Streams = OutputStream
[A.sb10] Modules =
[A.sb10] Engine = default-engine-for-com.example.downstream
[A.sb10] Path = downstream
[A.sb10] Type = NORMAL
[A.sb10] Enqueue = ENABLED
[A.sb10] Dequeue = ENABLED
[A.sb10] State = RUNNING // N.B. - container has been started
[A.sb10] Input Streams = InputStream
[A.sb10] Output Streams = OutputStream
[A.sb10] Modules =
[A.sb10] Engine = default-engine-for-com.example.downstream
[A.sb10] Path = RC_0_downstream_InputStream
[A.sb10] Type = NORMAL
[A.sb10] Enqueue = ENABLED
[A.sb10] Dequeue = ENABLED
[A.sb10] State = RUNNING
[A.sb10] Input Streams =
[A.sb10] Output Streams = out
[A.sb10] Modules = - epadmin servicename=A.sb10 display connection
[A.sb10] Engine = default-engine-for-com.example.upstream
[A.sb10] id = DB061451886ACA73812BB994A64E4D96
[A.sb10] peer = /127.0.0.1:65171
[A.sb10] local = /127.0.0.1:10001
[A.sb10] memory = 0bytes
[A.sb10] subscriptions = system._internal_control,upstream.OutputStream
[A.sb10] dequeued = 1
[A.sb10] enqueued = 0
[A.sb10] dequeuePackets = 1
[A.sb10] enqueuePackets = 0
[A.sb10] enqueuedStreams =
[A.sb10] enqueueBufferSize =
[A.sb10] protocolFamily = 10.3
[A.sb10] status = OK/OK
Issue/Introduction
How to run multiple StreamBase v10 engine process that talk to each other and exchange tuples via container connections.
Attachments
How to run multiple StreamBase v10 engine processes that exchange tuples
get_app
Feedback
thumb_up
Yes
thumb_down
No