Skip to content
This repository was archived by the owner on Mar 10, 2021. It is now read-only.

Update documentation on hdbpp. #356

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dlacoste-esrf
Copy link
Collaborator

Update hdbpp documentation.

break down the big document under services in smaller files for easier
management.

break down the big document under services in smaller files for easier
management.
Commands
~~~~~~~~

The commands availabile in the are summarized in commands-table.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to rephrase: "The commands available are summarized in commands-table."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done

The commands availabile in the are summarized in commands-table.

+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ArchiverAdd | add a new instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running; as per release adding an device to an existing instance is not supported |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explicit the release in the second part of the phrase. Moreover may be rephrased as "in the current design, only one ConfigurationManager device per instance is supported"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually reading this sentence, I don't understand what it means so it needs to be explicited, agreed, but I don't know how. This command is to add an eventsubscriber to the list, isn't it ? I don't understand this per release part at all… a device of what to an instance of what ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, these are two different points. Let's just remove the last part of the sentence. E.g. the ne one can read "add a new instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other point is that, currently, you cannot deploy two devices in the same ConfigurationManager instance. For sure it is not relevant here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation, done.

+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ArchiverAdd | add a new instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running; as per release adding an device to an existing instance is not supported |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ArchiverRemove | remove an from the list; neither the device instance nor the attributes configured are removed from the database |
Copy link

@lorenzopivetta lorenzopivetta Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"remove an Archiver from..."
This is missing from almost all descriptions (was a latex \def in the original format...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, especially for pointing out all the places it was missing !

+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| AttributeAdd | add an attribute to archiving |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| AttributeAssign | assign attribute to |
Copy link

@lorenzopivetta lorenzopivetta Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assign attribute to Archiver

+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| AttributeAssign | assign attribute to |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| AttributeGetArchiver | return in charge of attribute |
Copy link

@lorenzopivetta lorenzopivetta Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return Archiver in charge of attribute

+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Context | set context to all managed archivers |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ResetStatistics | reset statistics of and all |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reset statistics of ConfigurationManager and all Archivers


Table 1: Configuration Manager Commands.

Note that the list of managed is stored into the ArchiverList device

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the list of managed Archivers is...

Attributes
~~~~~~~~~~

The attributes of the are summarized in attributes-table.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The attributes of the ConfigurationManager device are...

Table 2: Event Subscriber Attributes.

The class and device properties availabile for configuration are shown
in table. According to TANGO

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..table 3.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am missing something here…
table 1 are the command, and this one should be 2 no ?

Copy link

@lorenzopivetta lorenzopivetta Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous one is Table 2. But line 111 we're talking about properties, so this must read "...table 3".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thx.


The device dynamically laods the configured library configured (using dlopen()) during the device initialization.
See :ref:`database-interface` section for more information.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure i remember correctly, but in a recent email exchange my understanding was the dynamic loading mechanism to be kept in place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went a bit ahead of myself here, I changed it.


The first two attributes will be archived in both RUN and SHUTDOWN
contexts; the last three only when in RUN.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following is a general description of the Configuration manager. Suggest to move at the beginning of hdbpp-cm-interface.rst

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea.
I am not sure the hdbpp-cm-interface.rst is the best place as it is supposed to describe the interface, this is more high level considerations here, but it still fits better than in the es-interface.
Thx for the suggestion

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option i to move it in the general section...

@@ -41,7 +41,7 @@ Elements
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| HDB++ Diagnostic | Standalone JAVA application that visualizes both the status of all the archiver device servers and the overall archiving system |
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Archiving DB | Specific Database devoted to storing attribute values. It can be either Mysql or Cassandra for the moment. |
| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra or Timescaledb. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mysql, Cassanadra, Postgres or TimescaleDB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed postgres as well, as a collateral, but it works.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, there's a native implementation for Postgres made by the guys in Russia...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, cool, I didn't know about that !

added missing "archiver" and "configuration manager" in hdbpp-cm-interface
fixed warning on libhdbpp dynamic loading not supported.
moved cm information from es page to cm one.
added postgres as a supported backend, as it is in a way.
workload over a large number of event subscriber shows up.
The configuration manager device server will assist in
the operations of adding, editing, moving, deleting an attribute the
archiving system. All the configuration parameters, such as polling
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is missing in "deleting an attribute the archiving system", maybe "deleting an attribute from the archiving system" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks


- to the specified device server

#. move an attribute from an device server to another one
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"from a device server"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, thanks

The configuration shall be possible via the device server API as well as
via a dedicated GUI interface; the GUI just use the provided API.

The may also expose a certain number of attributes to give the status of
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ConfigurationManager may

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn it ! missed some, thanks.

The may also expose a certain number of attributes to give the status of
what is going on:

- total number of
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

total number of Archivers ?

~~~~~~~~~~~~~~~~

+--------------------+--------------------------------------------------------+
| LibConfiguration | configuration parameters for backend support library |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a reference to different libhdbpp-xxx implementations documentation for details on syntax and possible parameters of LibConfiguration or should we add a section here in the documentation?
Same comment in hdbpp-es-interface where there is a small example of configuration for MySQL (incomplete).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually the configurationmanager does not depend on the backends anymore… we should remove this libconfiguration…
And maybe add some stuff on the hdbpp-es side. I am not sure a full section is necessary for this, it is pretty straightforward.

@@ -58,12 +58,32 @@ Elements



HDB++ inherits the database structure from the existing Tango Historical Data Base (:ref:`hdb_archiving`) and introduces new storage architecture possibilities, better internal diagnostic capabilities and an optimized API. Its design allows storing data into traditional database management systems such as MySQL or into NoSQL database such as Apache Cassandra.
HDB++ inherits the database structure from the existing Tango Historical Data Base (:ref:`hdb_archiving`) and introduces new storage architecture possibilities, better internal diagnostic capabilities and an optimized API. Different backends to store the data can be implemented through an unified interface, currently Timescaledb, MySQL and Apache Cassandra are supported.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing PostgreSQL and ElasticSearch

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added both of them, and a comment on cassandra support being dropped as suggested by @bourtemb

@@ -41,7 +41,7 @@ Elements
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| HDB++ Diagnostic | Standalone JAVA application that visualizes both the status of all the archiver device servers and the overall archiving system |
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Archiving DB | Specific Database devoted to storing attribute values. It can be either Mysql or Cassandra for the moment. |
| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra, PostgreSQL or Timescaledb. |
+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ElasticSearch. There is a preliminary implementaion (libhdbpp-elk) that is probably going to be finalized and maintained by SKA. At the same time Cassandra is not going to be maintained. Should we mention it here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should mention that Cassandra backend is not going to be maintained and maybe on line 61 too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and done, thanks

* **libhdb++mysql**: HDB++ schema support for MySQL back-end
* **libhdb++cassandra**: Cassandra back-end implementation of libhdb++
* **libhdb++timescale**: Timescaledb back-end implementation of libhdb++

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here about supported backends as above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, indeed. Thanks

.. _hdbpp-cm: https://github.com/tango-controls-hdbpp/hdbpp-cm
.. _hdbpp-es: https://github.com/tango-controls-hdbpp/hdbpp-es
.. _hdbpp-cm-es: https://github.com/tango-controls-hdbpp/hdbpp-cm-es
.. _libhdbpp: https://github.com/tango-controls-hdbpp/libhdbpp
.. _libhdbpp-mysql: https://github.com/tango-controls-hdbpp/libhdbpp-mysql
.. _libhdbpp-mysql-legacy: https://github.com/tango-controls-hdbpp/libhdbpp-mysql-legacy
.. _libhdbpp-cassandra: https://github.com/tango-controls-hdbpp/libhdbpp-cassandra
.. _libhdbpp-timescale: https://github.com/tango-controls-hdbpp/libhdbpp-timescale
.. _CassandraMonitor: https://github.com/tango-controls-hdbpp/CassandraMonitor
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add link to libhdbpp-postgresql and libhdbpp-elk

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be ok, now, or did I miss some other projects ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's WIP, but hdbpp-benchmark could be mentioned as "a project to compare performances of different HDB++ backends using dockers"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.



Source code
-----------

The source code is available on GitHub in the following repositories:

.. _hdbpp-timescale-project: https://github.com/tango-controls-hdbpp/hdbpp-timescale-project
.. _hdbpp-cm: https://github.com/tango-controls-hdbpp/hdbpp-cm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hdbpp-mysql-project exists as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants