[
https://issues.apache.org/jira/browse/IOTDB-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17064228#comment-17064228
]
Xiangdong Huang commented on IOTDB-519:
---------------------------------------
Hi [~VenkatDatta], looks good!
Ok, let's suppose we have a middleware (o a new API module of IoTDB) for
label-based data ingestion and query.
For example,
Insert a data point: 'insert(Map<Label, Value> timeseries, timestamp,
data_value)', or,
Insert a row record that belong to the same device: insert(Map<Label, Value>
device, timestamp, List<measurement> measurements, List<Data value>
data_values), or,
Insert a batch of points: 'insert(Map<Label, Value> timeseries, List<timestamp>
timestamps, List<data_value> values)'.
(These are just for examples, you do not need to implement them all).
And,
Query raw data point: "query(Map<Label, Value> some_timeseries,
List<Measurements>, time range, limit)"
(Query is very diverse, so... just define some queries that Prometheus may use).
Then, you just need to have an algorithm to decide how to map the label/values
to a timeseries or some timeseries with "*" (Remember that if a series is
"root.a.b.c", then "root.a.*.c" can match it while "root.a.b.*.c" can not match
it.). Then, translate the label/values into timeseries paths and call IoTDB's
session API or SQL to run the command.
It is implementation-free, no matter whether you build an invert index or put
the label name into "IOTDB path", right?
I think we can confirm the design of these interfaces in your proposal. Then
we still have time to decide how to implement the feature.
A more beautiful API design (for queries) is we define new SQLsyntax for IoTDB
to support the labels. However, it requires you know Antlr4. I am not sure
whether we have enough time in 3 months to do that.
Then, let's discuss how to implement the two approaches.
The first approach, you may still need to persist some content. For example,
when users query "where region = A and host =B", you do not know it is
"root.*.region.A.*.host.B" or "root.*.region.A.host.B".
Actually, if you have persist some content about the mapping, then maybe you do
not need to put the label name into the path any more.
Finally, I suggest putting all designs or discussion documents into one doc.
> Apache IoTDB integration with Prometheus
> ----------------------------------------
>
> Key: IOTDB-519
> URL: https://issues.apache.org/jira/browse/IOTDB-519
> Project: Apache IoTDB
> Issue Type: Wish
> Components: Others
> Reporter: Xiangdong Huang
> Priority: Major
> Labels: gsoc2020, iotdb, mentor
> Attachments: image-2020-03-07-15-24-34-192.png,
> image-2020-03-07-15-24-51-531.png, image-2020-03-07-15-25-08-037.png
>
>
> IoTDB is a highly efficient time series database.
> Prometheus is a monitoring and alerting toolkit, which supports collecting
> data from other systems, servers, and IoT devices, saving data into a DB,
> visualizing data and provides some query APIs.
>
> Prometheus allows users to use their database rather than just Prometheus DB
> for storing time series databases.
> This proposal is for integrating IoTDB with Prometheus.
>
> You should know:
> * How to use Prometheus
> * How to use IoTDB
> * Java and Go language
> difficulty: Major
> mentors:
> [email protected]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)