This document describes Odysseus possibilities to integrate external data streams.
Usage
To process external data streams they need to be registered in Odysseus. This is typically done with one of the query languages Odysseus provides:
...
The general structure of the framework is as follows:
PQL - ACCESS
To integrate new streams with PQL the ACCESS
-Operator is needed. Because of compatibility issues, there are a lot of more deprecated parameters, which can be set. In the following we will only describe the preferred parameters. The deprecated parameters will be removed in a future version.
...
New: All GenericPull sources can have an option scheduler.delay
. If this value is given the scheduler waits scheduler.delay
milliseconds between two calls. It can be used if the source update rate is known (e.g. a new value is produced every 15 minutes), the source does not allow more than a limited access per timeslot or the delivery rate should be slowed down.
Transport
This parameter selects the input type of the Wrapper, see Transport Handler for current information.
Protocol
The parameter determines how the input from the transport is processed. The main task for this component is the identification of objects in the input and the preparation for the data handler (see next parameter), see Protocol Handler for current information.
DataHandler
See Data handler for current information.
...
- Multi_Value: Creates a list. The schema defines the type of the list elements.
- Tuple: Creates a tuple. The schema parameter defines the set type of the elements
Examples
The following PQL command creates a new source with
...
Code Block |
---|
source = ACCESS({source='source', Wrapper='GenericPull', Schema=[['geometry','SpatialGeometry'], ['geometry_vertex_count','Integer'], ['OBJECTID','Integer'], ['ISO_2DIGIT','String'], ['Shape_Leng','Double'], ['Shape_Area','Double'], ['Name','String'], ['import_notes','String'], ['Google requests','String'] ], InputSchema=['SpatialKML','Integer','Integer','String','Double','Double','String','String','String'], transport='File', protocol='csv', dataHandler='Tuple', Options=[['filename','C:/Users/Marco Grawunder/Documents/My Dropbox/OdysseusQuickShare/Daten/Geo/World Country Boundaries.csv'], ['Delimiter',',']]} |
PQL - Sender
To publish processed data with PQL the SENDER
-Operator is needed. This operator takes care of the application depending and transport depending transformation and delivery of the processed elements in the data stream.
The following parameters are required in the SENDER-Operator:
Parameter
Sink
This is the system wide unique name of the sink. If the sink name is already used and further parameters are given, an error is thrown. An already created sink can be reused by using this sink parameter only.
Wrapper
This parameter allows the selection of the wrapper that is responsible for the delivery of the data. In Odysseus the default wrappers are GenericPush and GenericPull. Other extensions provide further names.
Transport
The transport handler is responsible for the delivery of the processed data stream elements at a given endpoint.
Protocol
The protocol handler is responsible for the transformation of the processed sensor data elements into an application depending protocol to transport them over a given transport protocol to an endpoint.
DataHandler
The data handler transforms the elements in a data stream to the right representations (I.e. String or Byte Array). Depending on the protocol handler a specific data handler may be required. However, in most cases the data handler Tuple should be adequate.
Options
The options field includes additional parameter for the transport and protocol handlers.
Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
output = SENDER({ wrapper='GenericPush', transport='TCPClient', protocol='CSV', dataHandler='Tuple', options=[['host', 'example.com'],['port', '8081'],['read', '10240'],['write', '10240']] }, input) |
...