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

ports implicitly buffered with WirePattern #239

Closed
djdeath opened this issue Jul 28, 2014 · 2 comments
Closed

ports implicitly buffered with WirePattern #239

djdeath opened this issue Jul 28, 2014 · 2 comments

Comments

@djdeath
Copy link
Member

djdeath commented Jul 28, 2014

NoFlo input ports are implicitly non buffered : https://github.com/noflo/noflo/blob/master/src/lib/InPort.coffee#L17

But using WirePattern implicitly buffers the data of the port. Shouldn't WirePattern respect the config of the port?

@djdeath
Copy link
Member Author

djdeath commented Jul 28, 2014

Here is an example : https://github.com/noflo/noflo-gnome/blob/master/examples/2048/components/SquashTiles.coffee

The map input port being a parameter, no processing occurs until the data is received.
Once it arrives, all the directions received are processed. I would expect that only the last one would be processed, since it's a non buffered port.

@trustmaster
Copy link
Member

WirePattern does not use built-in port buffers, however it maintains several buffers of its own to synchronize incoming data. Marking a parameter as required makes the component wait for that parameter before processing any input. If we change it to drop all the input before all required parameters are received it would cause unexpected loss of data in many cases, or many components will likely have to set buffering: true on their ports.

Alternatively, an option could be added to WirePattern to drop premature data instead of buffering it. Does it have to be port-specific or could it work for entire component?

@bergie bergie closed this as completed in 8500ec9 Aug 4, 2014
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