noflo/noflo — pull request #258 by trustmaster (2014-09-05 11:11:40+00:00)
Title: Basement for request processing in WirePattern

The following changes in WirePattern are introduced by this PR:

- If a `RegExp` instance is passed to `group` option, WirePattern
merges input streams by outer groups matching that regexp. This is
handy e.g. for matching requests by UUIDs, ignoring other groups.
- When `group` option is used, the groups passed to the `proc`
function only contain groups common for all inputs (intersection
of groups). Before it passed groups for the last inport to receive
data.
- `component.dropInput(key)` method is provided to drop data manually
by request key. Useful when merging requests by ID and dropping
them on error.
- Garbage Collector is built into WirePattern to protect from memory
leaks when using the `group` option. WirePattern maintains buffers
for incomplete data tuples and Garbage Collector removes buffered
requests which stay incomlete too long. There are 2 new options to
customize Garbage Collector's behavior:

* `gcFrequency` sets per how many new data packets the GC should be
invoked again (default is 100)
* `gcTimeout` sets how many seconds an incomplete request should be
pending in WirePattern's buffers before GC wipes it out (default
is 300)