## 4 Related Work
### Portability Core (PoCo)
#### 5.5.2 PoCo Components  
The available nodes in the PoCo for data flow programming with which users can define application behaviours are known as PoCo components. PoCo components have a set of inputs and outputs and a given behaviour, e.g., a URI filter component which filters the list of resources received based on the URI information provided in the component. There are some components that need a certain input, as for example, a group component waits for a set of resources to create a new group of these resources. Others can receive inputs from multiple components, such as the component in charge of sending all generated messages to the user applications. Components can be connected with each other in the correct way, forming work flows. Depending on their connections and the components involved, a large number of flows can be generated only with a few components. Therefore, with the same components or a subset of them and different component' connections, multiple behaviours can be obtained. To avoid functionality interruptions, there are necessary components and connections that are critical to the system (e.g., the discovering process) but there are also many optional components, such as filters which can be included in flows allowing different behaviours. For the creation of a new component, an HTML file, with its style, and a Javascript file, with its functionality (e.g., filtering CoAP resources), only have to be defined; and then incorporating them to the system configuration. From that moment on, the component will be part of the palette enabling its inclusion in the development of IoT applications. Next, the developed components to define the PoCo behaviours are given:  
* Filters: A set of components that filter the list of resources received based on the information established in the components or received in the messages. The filter (resource type, location or URI) information can be configured in each component. Filtering follows open standards for device interaction such as the OMA LWM2M standard [37], thereby it enables a common language in the integration with external systems and user applications. * Groups: Group is a new entity which aims to address several CoAP resources as a group instead of addressing each resource individually. Groups offer a set of operations for the values of their resources and the possibility to observe them. End users can interact with a set of resources through a group-specific CoAP resource created by this component. * Group operations: As mentioned above, groups enable a set of operations that can be applied on them. Among these operations are included the minimum, maximum, average and real-time list of resources values. This component makes an observation to the group received with the operation selected and returns asynchronously the information received. * Observations: Resources can also be observed individually without a group association. This component enables the observation in the resources received and return the data obtained asynchronously. * Alerts: Sometimes end users can be interested in receiving warnings when something changes in the environment, e.g., a door has been opened. This component checks the data received from the observations and the group operations components and sends an alert message to user applications when the data matches the filters established. * Actuation trigger: The reaction to conditions established in the environment is addressed by this component. Once an alert has been received based on the established conditions, this component triggers the target resources with the value established in the component to be actuated by the Send request component. * Charts: This component adds extra information to the data received in order to inform user applications that data should be rendered such as a chart. Otherwise, data is shown without a rendered component. * Function: Although the goal of App adaptivity is not to program source code except visually, this component enables adding source code for specific tasks.