Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When do the events emitted by Port get emitted? And what do they mean?

Tags:

noflo

As far as I can tell there are 7 events dispatched by a NoFlo port:

attach, connect, begingroup, data, endgroup, disconnect, detach

To 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 do these events get emitted and when are they generally used?

I've seen the documentation at: http://noflojs.org/documentation/components/#portevents

Would my assumption be correct to assume that attach and detach are for handling NoFlo UI cases eg changing the state of the components look?

Another assumption would be that connect gets fired every time before data is sent? Then data gets fired. Then disconnect? Seems a bit odd to me...

I'm completely in the dark when it comes to groups.

like image 482
MikkoH Avatar asked Mar 07 '14 22:03

MikkoH


People also ask

What are the major sources of air pollution from ships?

Commercial ships burn fuel for energy and emit several types of air pollution as by-products. Ship-source pollutants most closely linked to climate change and public health impacts include carbon dioxide (CO2), nitrogen oxides (NOx), sulphur oxides (SOx) and particulate matter.

How does Marpol affect the environment?

The main changes to MARPOL Annex VI are a progressive reduction globally in emissions of SOx, NOx and particulate matter and the introduction of emission control areas (ECAs) to reduce emissions of those air pollutants further in designated sea areas.

What is the Regulations for the Prevention of air pollution from ships?

The International Convention for the Prevention of Pollution from Ships (MARPOL), 1973 as modified by the Protocol of 1978, also known as MARPOL 73/78, Annex VI Prevention of Air Pollution from Ships, requires the reduction of SOx emissions either by burning low sulfur fuel oil or cleaning the exhaust gas.

What means EU MRV?

Introduction. The European Union (EU) MRV Regulation (Regulation (EU) 2015/757 on the monitoring, reporting and verification of carbon dioxide emissions from maritime transport, and amending Directive 2009/16/EC) entered into force on 1 July 2015.


1 Answers

attach and detach happen when the NoFlo Network attaches (or removes) a socket to the port. So usually they happen at network start-up time, before IIPs get sent.

The exception to this is when you're live-editing the graph with a tool like Flowhub. In that situation attach/detach can happen whenever you connect or remove wires.

Most components don't need to care about the attachment events.

connect happens before the upstream connection sends data, and disconnect when the upstream connection says that it has sent everything it is intending to send. So in effect they're beginning of transmission and end of transmission events. An upstream component may choose to connect again after a disconnect if it has a new batch of data to send.

data is the event for actual payload-containing packets.

begingroup and endgroup are the "bracket IPs" containing metadata about the data being sent. They can be used for creating tree structures with packet data.

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

The noflo-groups library provides lots of components for utilizing group information for synchronization, routing, etc.

like image 150
bergie Avatar answered Oct 16 '22 22:10

bergie