New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: add documentation for Backend Metadata and Timedata #2314
Docs: add documentation for Backend Metadata and Timedata #2314
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some typos and inconsistencies. See my comments.
@tsicking Thanks for reading. Great findings. |
And only in a very few cases it gets the data from `DB 1` | ||
(probably slower). | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also mention what availableSince is doing?
I think it could be confusing when queries wont get handled by the AggregatedInflux because of it.
curl -i -XPOST http://127.0.0.1:8081/query --data-urlencode "q=CREATE DATABASE aggregated0" | ||
|
||
curl -i -XPOST http://127.0.0.1:8081/query --data-urlencode "q=CREATE RETENTION POLICY rp_max ON aggregated0 DURATION 90d REPLICATION 1" | ||
curl -i -XPOST http://127.0.0.1:8081/query --data-urlencode "q=CREATE RETENTION POLICY rp_avg ON aggregated0 DURATION 90d REPLICATION 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should link to this documentation. And the more important configuration is the the shard duraction
If someone has the same settings for both retention policies they dont have to create the same one twice.
We are using two different retention policies:
For avg there should be data every 5-Minutes and the data in this measurement gets used for queries over one day and one week. Therefore we set the shard duration to 24h to only read two shards for a day query.
For max we used a shard duration fo 31 days because there is much less data in this measurement (only one per day) and to optimize queries for months only 2 shards need to be readed by the db.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This is a valid comment, but in order to release these docs more quickly I decided to leave it out for now. I am happy to accept future documentation PRs from you. ;-)
:icons: font | ||
:imagesdir: ../../assets/images | ||
|
||
The nature https://github.com/OpenEMS/openems/blob/36343dde95c832d80ec55177b412427480973b45/io.openems.backend.common/src/io/openems/backend/common/metadata/Metadata.java#L32[Metadata] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to use the term 'Nature' only for Java interfaces, that also have Channel-IDs. (see https://openems.github.io/openems.io/openems/latest/coreconcepts.html#_nature). Metadata
ist just a normal interface.
curl -i -XPOST http://127.0.0.1:8081/query --data-urlencode "q=CREATE DATABASE aggregated0" | ||
|
||
curl -i -XPOST http://127.0.0.1:8081/query --data-urlencode "q=CREATE RETENTION POLICY rp_max ON aggregated0 DURATION 90d REPLICATION 1" | ||
curl -i -XPOST http://127.0.0.1:8081/query --data-urlencode "q=CREATE RETENTION POLICY rp_avg ON aggregated0 DURATION 90d REPLICATION 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This is a valid comment, but in order to release these docs more quickly I decided to leave it out for now. I am happy to accept future documentation PRs from you. ;-)
The documentation is already very helpful the way it is. Future PRs can improve it further.
This list is not complete. | ||
==== | ||
|
||
include::service.adoc.d/_include.adoc[leveloffset=+0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, just saw this file is missing on develop, can you readd it?
Adds some basic backend documentation about Metadata and Timedata. Gives some more starter information on the usage of the influxdb and the aggregated influxdb bundle.
Note: needs PR #2313 to be accepted before.