When do emissions emanate from the port? And what do they mean?

As far as I can tell, there are 7 events posted by NoFlo port:

join, connect, begingroup, data, ENDGROUP, disconnect, detach

For me, some of these events sound very similar, such as attach + connect and disconnect + detach. What is the difference?

What does begingroup and endgroup mean?

When are these events emitted and when are they commonly used?

I saw the documentation at: http://noflojs.org/documentation/components/#portevents

Will my assumption be correct in assuming that attachment and detachment are designed to handle NoFlo UI, for example, changes in the state of components look like?

Another assumption would be that the connection starts every time before sending data? Then the data is fired. Then disconnect? Seems a little strange to me ...

I am completely in the dark when it comes to groups.

+6
source share
1 answer

attach and detach occur when NoFlo Network attaches (or removes) a socket to a port. Thus, they usually occur when the network starts, before IIP messages are sent.

The exception is that you are editing the chart with a tool such as Flowhub . In this situation, attach / detach may occur whenever you connect or remove wires.

Most components do not have to worry about binding events.

connect occurs before the uplink sends data, and disconnect when the uplink says it has sent everything it intends to send. Thus, they begin the transmission and completion of transmission events. The upstream component may select connect again after disconnect if it has a new batch of data to send.

data is an event for packets containing a payload.

begingroup and endgroup are "moving IP addresses" containing metadata about the data being sent. They can be used to create tree structures with batch data.

For example, filesystem/ReadFile will send the contents of the file as a data packet, but the file name is sent via the IP address using begingroup / endgroup around the actual contents of the file.

The noflo-groups library provides many components for using group information for synchronization, routing, etc.

+4
source

All Articles