Versions Compared

Key

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

In die original solution, there was a protobuf base server. This server is no longer available. To process the data in any case we provide a simple example with a csv file:

Code Block
#PARSER

We provide two solutions. The first one reads its input by providing a Google Protobuf server.

Solution with Protobuf

To use this solution, the following features need to be installed:

...

Code Block
#PARSER PQL
#QUERY
gchSource := RECEIVETIMESTAMPORDERVALIDATE({
      SOURCE = 'GrandChallengeDataPoint',
    DataHandler = 'Tuple',
    TRANSPORTdebug='ProtobufServer'true,
 
         OPTIONS=[
        ['type','debs.challenge.msg.CDataPoint'],debugmode=0
        ['port','9999'],
        ['BaseTimeUnit','NANOSECONDS']],
},
        SCHEMA=[
        ['ts','StartTimeStamp'],
CSVFILESOURCE({
              ['index','long'],
      source = ['mf01','integer']GrandChallengeDataPoint',
        ['mf02','integer'],
            delimiter = ['mf03','integer']'\t',
        ['pc13','integer'],
         ['pc14','integer'],
   filename    = ['pc15','integer'],'${WORKSPACEPROJECT}/allData.txt',
        ['pc25','long'],
        ['pc26','long'],
        ['pc27','long'],
dateformat="yyyy-MM-dd'T'HH:mm:ss.SSSSSSSzzz",
            ['res','long'],
        ///options=[['bm05scheduler.delay','Boolean1000']],
         ['bm06','Boolean'],
        ['bm07','Boolean'],
   schema=[
          ['bm08','Boolean'],
            ['bm09ts','BooleanStartTimestampString'],
        ['bm10','Boolean'],
        ['pp01','Boolean'],
        ['pp02index','Booleanlong'],
          ['pp03','Boolean'],
            ['pp04mf01','Booleaninteger'],
              ['pp05','Boolean'],
        ['pp06mf02','Booleaninteger'],
          ['pp07','Boolean'],
            ['pp08mf03','Booleaninteger'],
           ['pp09','Boolean'],
           ['pp10pc13','Booleaninteger'],
         ['pp11','Boolean'],
             ['pp12pc14','Booleaninteger'],
        ['pp13','Boolean'],
        ['pp14','Boolean'],
        ['pp15pc15','Booleaninteger'],
         ['pp16','Boolean'],
             ['pp17pc25','Booleanlong'],
              ['pp18','Boolean'],
        ['pp19pc26','Booleanlong'],
         ['pp20','Boolean'],
             ['pp21pc27','Booleanlong'],
           ['pp22','Boolean'],
           ['pp23res','Booleanlong'],
        ['pp24','Boolean'],
              ['pp25bm05','Boolean'],
        ['pp26','Boolean'],
              ['pp27bm06','Boolean'],
         ['pp28','Boolean'],
             ['pp29bm07','Boolean'],
         ['pp30','Boolean'],
             ['pp31bm08','Boolean'],
              ['pp32','Boolean'],
        ['pp33bm09','Boolean'],
            ['pp34','Boolean'],
          ['pp35bm10','Boolean'],
         ['pp36','Boolean'],
             ['pc01pp01','Boolean'],
        ['pc02','Boolean'],
              ['pc03pp02','Boolean'],
        ['pc04','Boolean'],
              ['pc05pp03','Boolean'],
        ['pc06','Boolean'],
              ['pc19pp04','Boolean'],
                      ['pc20pp05','Boolean'],
              ['pc21','Boolean'],
        ['pc22pp06','Boolean'],
              ['pc23','Boolean'],
        ['pc24pp07','Boolean'],
         ]
    }
)

The source definition is done with a Receive operator. This means, the source sends its information to Odysseus.

The Data is transported by a Google Protobuf handler. Opposed to many other approaches, this handler combines Transport handler and Protocol handler.

Further information for the Protobuf Server is given with the options:

     

...

    

...

['

...

pp08','

...

Boolean'],
                      ['

...

pp09','

...

Boolean'],
                      ['

...

pp10','

...

Boolean'

...

The type is the compiled version of the protobuf specification file given by the DEBS organisators. Is must be provided inside a special bundle.

Port if the port on which der Server is started on the machine where the query is executed. In a monolithic version this would be on localhost, in a server version this would be on the Odysseus server.

Odysseus can read the timestamps from the input schema. If no further information is given, the unit of the timestamp is assumed to be milliseconds. With BaseTimeUnit the real time unit can be set.

Finally, the schema definition represents the internal format of the data inside of Odysseus, i.e. there are tuples with the given schema.

Alternative Solution

Because the data is given as csv file, the external server can be omitted and allows for some tests an easier processing. Here we simpy use the  CSV protocol handler and read the input from file.

Code Block
#PARSER PQL
#QUERY
gchSource := TIMESTAMPORDERVALIDATE({
],
                      ['pp11','Boolean'],
                      ['pp12','Boolean'],
                      ['pp13','Boolean'],
                      ['pp14','Boolean'],
                      debug=true['pp15','Boolean'],
                  debugmode=0
       ['pp16','Boolean'],
         },
                CSVFILESOURCE({['pp17','Boolean'],
                    source = ['pp18','GrandChallengeDataPointBoolean'],
                    delimiter = '\t'['pp19','Boolean'],
                    filename = '${WORKSPACEPROJECT}/allData.txt'['pp20','Boolean'],
                    dateformat="yyyy-MM-dd'T'HH:mm:ss.SSSSSSSzzz",
  ['pp21','Boolean'],
                      ///options=[['scheduler.delaypp22','1000Boolean']],
                     schema=[ ['pp23','Boolean'],
                      ['tspp24','StartTimestampStringBoolean'],
                      ['indexpp25','longBoolean'],
                      ['mf01pp26','integerBoolean'],
                      ['mf02pp27','integerBoolean'],
                      ['mf03pp28','integerBoolean'],
                      ['pc13pp29','integerBoolean'],
                      ['pc14pp30','integerBoolean'],
                      ['pc15pp31','integerBoolean'],
                      ['pc25pp32','longBoolean'],
                      ['pc26pp33','longBoolean'],
                      ['pc27pp34','longBoolean'],
                      ['respp35','longBoolean'],
                      ['bm05pp36','Boolean'],
                      ['bm06pc01','Boolean'],
                      ['bm07pc02','Boolean'],
                      ['bm08pc03','Boolean'],
                      ['bm09pc04','Boolean'],
                      ['bm10pc05','Boolean'],
                      ['pp01pc06','Boolean'],
                      ['pp02pc19','Boolean'],
                      ['pp03pc20','Boolean'],
                      ['pp04pc21','Boolean'],
                      ['pp05pc22','Boolean'],
                      ['pp06pc23','Boolean'],
                      ['pp07pc24','Boolean'],
                    ]    ['pp08','Boolean'],
                
      ['pp09','Boolean'],
              }        ['pp10','Boolean'],
      
                ['pp11','Boolean'],)
                      ['pp12','Boolean'],
                      ['pp13','Boolean'],
                      ['pp14','Boolean'],
           )

In this case, the csv file is found in the workspace folder.

Remark:

  • The input file does not contains long values for the time stamp but a String date format. The format of the input string is given with the option:dateformat.
  • The input file contains some time stamps out of order. So the TimestampOrderValidate Operator is used to suppress these values.






In the original version, we used google protobuf, which is not supported anymore


We provide two solutions. The first one reads its input by providing a Google Protobuf server.

Solution with Protobuf

To use this solution, the following features need to be installed:

Code Block
#PARSER PQL
#QUERY
gchSource := RECEIVE({
    SOURCE = 'GrandChallengeDataPoint',
    DataHandler = 'Tuple',
    TRANSPORT='ProtobufServer', 
    OPTIONS=[
           ['pp15type','Booleandebs.challenge.msg.CDataPoint'],
           ['port','9999'],
           ['pp16BaseTimeUnit','BooleanNANOSECONDS']],
    SCHEMA=[
          ['ts','StartTimeStamp'],
        ['pp17index','Booleanlong'],
        ['mf01','integer'],
              ['pp18mf02','Booleaninteger'],
            ['mf03','integer'],
          ['pp19pc13','Booleaninteger'],
              ['pc14','integer'],
        ['pp20pc15','Booleaninteger'],
          ['pc25','long'],
            ['pp21pc26','Booleanlong'],
              ['pc27','long'],
        ['pp22res','Booleanlong'],
         ['bm05','Boolean'],
             ['pp23bm06','Boolean'],
        ['bm07','Boolean'],
              ['pp24bm08','Boolean'],
              ['bm09','Boolean'],
        ['pp25bm10','Boolean'],
              ['pp01','Boolean'],
        ['pp26pp02','Boolean'],
              ['pp03','Boolean'],
        ['pp27pp04','Boolean'],
             ['pp05','Boolean'],
         ['pp28pp06','Boolean'],
            ['pp07','Boolean'],
          ['pp29pp08','Boolean'],
        ['pp09','Boolean'],
        ['pp10','Boolean'],
        ['pp30pp11','Boolean'],
        ['pp12','Boolean'],
              ['pp31pp13','Boolean'],
              ['pp14','Boolean'],
        ['pp32pp15','Boolean'],
          ['pp16','Boolean'],
            ['pp33pp17','Boolean'],
         ['pp18','Boolean'],
             ['pp34pp19','Boolean'],
              ['pp20','Boolean'],
        ['pp35pp21','Boolean'],
              ['pp22','Boolean'],
        ['pp36pp23','Boolean'],
              ['pp24','Boolean'],
        ['pc01pp25','Boolean'],
              ['pp26','Boolean'],
        ['pc02pp27','Boolean'],
             ['pp28','Boolean'],
         ['pc03pp29','Boolean'],
        ['pp30','Boolean'],
        ['pp31','Boolean'],
        ['pc04pp32','Boolean'],
        ['pp33','Boolean'],
              ['pc05pp34','Boolean'],
              ['pp35','Boolean'],
        ['pc06pp36','Boolean'],
           ['pc01','Boolean'],
           ['pc19pc02','Boolean'],
                      ['pc20pc03','Boolean'],
                      ['pc21pc04','Boolean'],
            ['pc05','Boolean'],
          ['pc22pc06','Boolean'],
        ['pc19','Boolean'],
              ['pc23pc20','Boolean'],
        ['pc21','Boolean'],
              ['pc24pc22','Boolean'],
        ['pc23','Boolean'],
            ]['pc24','Boolean']
        ]
    }
)

The source definition is done with a Receive operator. This means, the source sends its information to Odysseus.

The Data is transported by a Google Protobuf handler. Opposed to many other approaches, this handler combines Transport handler and Protocol handler.

Further information for the Protobuf Server is given with the options:

    

...

OPTIONS=[
        

...

['type','debs.challenge.msg.CDataPoint'],
        

...

['port','9999'],
        

...

In this case, the csv file is found in the workspace folder.

Remark:

...

['BaseTimeUnit','NANOSECONDS']],

The type is the compiled version of the protobuf specification file given by the DEBS organisators. Is must be provided inside a special bundle.

Port if the port on which der Server is started on the machine where the query is executed. In a monolithic version this would be on localhost, in a server version this would be on the Odysseus server.

Odysseus can read the timestamps from the input schema. If no further information is given, the unit of the timestamp is assumed to be milliseconds. With BaseTimeUnit the real time unit can be set.

Finally, the schema definition represents the internal format of the data inside of Odysseus, i.e. there are tuples with the given schema

...

.