The Xentara InfluxDB Client v1.2.1
User Manual
WriteRequest
See also
Skill Elements in the Xentara user manual,
InfluxDB Open Source Time Series Database.

Description

WriteRequest is a type of Xentara element. WriteRequest is a child element of the Client instance and can have one or more instances. Client sets the target in which the WriteRequests will sent the data and each WriteRequest assigned the RecordGroups where the set of measurements is defined. This set shares the same configurations for tags, fields, and batch size. WriteRequest can establish connection with http or https Server and ensures that each measurement and the other Influxdb elements will have the proper format to be sent into the Influxdb server.

BatchSize

Every time the task sent is called , WriteRequest reads the values from the datapoints and appends the values into the buffer.

The batch size is defined by requests and loops and determines when the WriteRequest is ready to send the data from the buffer.

  • requests refers to the number of requests with the measurement records requires for the WriteRequest to collect to sent.
  • loops refers to the number of loops performed before sending the requests with the measurement records.

The records are sent when each of those counters reaches first.

For example :

  • If requests is set to 100 and the loops is set to 1, with an entry of 1000 of new requests of measurement records added into the buffer, it will send 10 batches of 100 measurement records each.
  • If requests is set to 1000 and the loops is set to 2, with 200 new an entry of new requests of measurement records of each call, one batch of 400 measurement records will be sent in the second loop.

According to InfluxDB manual the optimal batch size is 5000 records per request. By Default Xentara Influxdb plugin uses 5000 records and 1 loop.

RecordGroups

Record Groups containing a list of record of the measurements, an optional list of tags and a list with the fields to be sent on the target.

Measurements

The list of measurements contains the records of the measurements that will be sent by any WriteRequest. Each measurement record is defined from a unique string value paired with the primary key of the corresponding datapoint.

Measurement Record

A measurement record describes the set of data which is sent to the target deriving from a single datapoint. A measurement record consists of tags, fields and a timestamp. The timestamp has accuracy of a nanosecond precision and it is added by default on the measurement record. The time on the timestamp indicates the time when the value was read from the datapoint.

Tags

Tags are optional InfluxDB data structure elements used for storing commonly queried metadata. The Xentara InfluxDB Client assigns attributes as tags in the InfluxDB server in each measurement record. As name tag can be defined a unique string value paired with the value of the primary key of a datapoint. By default, Xentara InfluxDB, creates a tag named “host” which is reserved the string value of the name of the host computer of the client.

Fields

Field values are the actual measurements, and they can be type of strings, floats, integers, or booleans. The Xentara InfluxDB Client assigns attributes as fields in the InfluxDB server in each measurement record. As name field can be defined a unique string value paired with the value of the primary key of a datapoint.

Optimization

Xentara InfluxDB Client uses techniques to optimise the data transmission from the InfluxDB client to the InfluxDB server.

  • Batch Size. Xentara InfluxDB Client allows to adjust the batch size according to the needs of the system. According to the InfluxDB manual the optimal batch size is 5000 per request.
  • Data compression. InfluxDB server allows compressed data to be received from the client devices. The Xentara InfluxDB Client compresses the data using gzip and can accelerate the transmission speed by 5 times .

These techniques not only increases the transmission speed but also reduces the data traffic on the network.

WriteRequest Task

See also
Tasks in the Xentara user manual
Tasks
sentReads the datapointers and sends the data.