Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle two input ports in components #59

Closed
mohandass-pat opened this issue Jul 21, 2019 · 1 comment
Closed

Handle two input ports in components #59

mohandass-pat opened this issue Jul 21, 2019 · 1 comment

Comments

@mohandass-pat
Copy link

mohandass-pat commented Jul 21, 2019

Hi. I want to implement a process that needs to be implemented from two inputs. For example there are three components. In component A I will give 1 in component B I will give 2, And I will map these outputs to Component C. in the component C 1 + 2 = 3 like this process has to performed. So how can I access the data from both input ports at the same time. Kindly help me on this. Any examples on this scenario
and also how to access the data from graph in port.

"connections": [ { "data": "packet", "tgt": { "process": "repeater", "port": "test" } },

in this graph "data" will be sent to repeater component test. How to get that value. will it be setup while calling msgflo-setup command?

Thanks in advance :)

@jonnor
Copy link
Member

jonnor commented Jul 22, 2019

Msgflo has no synchronization mechanism between multiple queues. Because there are no general syncronization mechanisms, and msgflo has no store for state. So if you need to synchronize data-streams at runtime, put the data needed into a database, and use messages with references to the data as the 'event' to trigger the next computation on.

For IIPs, which are known at graph startup time, and is often used for configuration/parametrizing a component, the data could also be provided on the commandline. The msgflo tools can then use that extract this from the graph and provide it to the processes at startup.
Unfortunately for msgflo-nodejs this is not supported right now, see #7

@jonnor jonnor closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants