Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

At the beginning, Odysseus translates the query in a logical graph. This logical graph is preprocessed and then partitioned. The result of the Partition phase is a collection of query parts, which are individually modified in the Modification phase. However, the Modification-phase is optional an can be omitted. After that, the Allocation phase decides, which query part should be executed on which OdysseusNode. Finally, the query parts are transmitted to the selected nodes. Preprocess, Partition, Modification, Allocation and Postprocess provide multiple strategies the user can select from (individually for each query, if needed). For this, the Additionally, some strategies can be parameterised . The user has to use specific OdysseusScript keywords. One example for query distribution is as follows:

Code Block
languagejava
linenumberstrue
/// Indication that we want to distribute queries
#CONFIG DISTRIBUTE true 

#NODE_PREPROCESS SOURCE					/// Select Source strategy for pre-processing
#NODE_PARTITION OPERATORCLOUD			/// Select OperatorCloud strategy for Partition phase
#NODE_MODIFICATION REPLICATION	 2		/// Select Replication strategy for Modification phase (with replication degree 2)
#NODE_ALLOCATION USER					/// Select User-strategy for Allocation phase
#NODE_POSTPROCESSOR LOCALSOURCES		/// Select multiple strategies for post-processing
#NODE_POSTPROCESSOR LOCALSINKS
#NODE_POSTPROCESSOR MERGE

/// "Typical" query definition here
#METADATA TimeInterval
#PARSER PQL
#ADDQUERY
<Query>

...

Modification

Query parts are replicated, but each copy retrieves a part of the incoming data stream. See Fragmentation
Strategy nameDescription
Replicationreplication <degree>Query parts are replicated (with replicationdegree degree), executed multiple times. See Replication.Fragmentation.

Allocation

Strategy nameDescription
direct

All query parts are assigned to the specified OdysseusNode.

Code Block
#NODE_ALLOCATE DIRECT MyNode1 
querycountQuery parts are assigned to nodes with the least count of queries.
roundrobinQuery parts are assigned in order.
userQuery parts are assigned to user-specified nodes. For this, each logical operator has a DESTINATION-Parameter in PQL. Two operators which have the same DESTINATION-value are assigned to the same node.

Postprocess

Strategy nameDescription
localsinkLogical sink operators are staying local (on the distributing node) overriding allocation. Useful if the user wants to have the last operator to check the data stream results.
localsourceLogical source operators are staying local (on the distribution node) overriding allocation. Useful if the user do not want to share its source operators to other nodes.
mergeTwo adjacent query parts which are assigned to the same node are merged to omit unneeded network-transmission operators.