-
Notifications
You must be signed in to change notification settings - Fork 27
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
Design and implement Conditions Data access in Falaise #90
Comments
Some initial considerations:
|
Adding additional people involved in the discussion. |
Has any other discussion happened outside of this issue's thread? |
I'll just mention PR #154 here to cross-reference it. A service likely forms the basis of accessing Conditions Data inside the pipeline. @pfranchini, @robobre will be setting up a meeting next week I think for update/discussion. I'll forward/cc you the details when they're out. |
I am finally into this issue! (branch add-database-service on my Falaise's fork). I have written the base for the database manager and the database service. And working now on DB connexion. I am suffering 2 issues due to lack of expertise on brew and cmake, @drbenmorgan you might be able to guide me : -- I am using MySQL++ which provides a C++ wrapper for mysql-client, installed with brew for which [email protected] is required. Bayeux is also relying on openssl but default version (1.0) and I suspect I am having conflicts at runtime with that. How to handle that ? Should I switch all Bayeux dependencies to [email protected] ? Or is there a solution tor work with both with brew ? -- How can I add the new dependencies for Falaise (MySQL++ and mysql-client) within CMakeLists.txt in a non-dirty way ? knowing that mysql-client is installed in $BREW/opt/mysql-client without find cmake. There is at least a pkgconfig script for mysql-client, but nothing for mysql++ ! Thanks for your help |
Whilst it's a C-only API (but a good one), could mariadb-c-connector be used instead? It's a much lighter library than mysql plus another lib on top of that.
If they have https://gitlab.cern.ch/lhcb/GitCondDB/blob/master/CMakeLists.txt#L46 and linking here: https://gitlab.cern.ch/lhcb/GitCondDB/blob/master/CMakeLists.txt#L127 It should be a case of doing: find_package(PkgConfig)
pkg_check_modules(MYNAME mysql-client REQUIRED IMPORTED_TARGET)
...
target_link_libraries(DBService PRIVATE PkgConfig::MYNAME) |
Thanks for the suggestion. I will investigate mariadb-c-connecter, however it still requires [email protected] from its formula ! |
Why should we use MySQL or MariaDB ?
|
The title of this issue proposed by drbenmorgan is : |
The title was modified, but initial topic was indeed implementing DB access in Falaise! |
Most simple case: energy calibration of calorimeter OMs with 1 parameter (Energy = a x Charge)
We are working on it in parallel, the idea and change from current model is to be able to handle different version of charge and energy (e.g. in a vector) computed/calibrated with different methods. Such dynamic data models would not require modification of members, but just addition of enum for indexing the new version. I hope that make sense ?
This question will happen for all data to be store indeed, but I am not sure to understand the point because we need need anyway the interface to get both stable data and update-able data ? |
As far as I am aware, AMI is not the conditions database! It isn't in ATLAS, see this paper, and this one, especially 2.2.
Yes and no. I agree that the fundamental issue is the client API, so that can and should be mocked in with what we know to date, e.g. class CondDBService {
... what member functions do users of the service need ...
# This is probably one of them
OMParameter getOMParameter(OMID x, IOV i) const;
}; What goes on in the implementation will always be technology dependent, but it is effectively defined for us as SQL (by CC-Lyon), though the LHCb GitCondDB remains an option (and likely will be used for geometry etc). I'm therefore not adverse to the use of SQL libraries at this stage modulo that they are only used as an implementation detail. @emchauve one thought, could you use the SQLite library for prototyping? It's very simple, similar API to MySQL/MariaDB, and as it's file based can be used offline. |
In fact, the AMI client API is really ultra light, few 100 lines of codes (https://github.com/ami-team/cami/) and the admin web interface is very convenient to handle a common set of users and privileges over different DBs. There is few different output format provided by the server : text, CSV, JSON or XML. You can give a try there with GetSessionInfo command (the only command available for guest user) : https://ami-supernemo.in2p3.fr/app/?subapp=command The most interesting output format provided by the server would be JSON I guess (?) for which we will need a parser. Do you have feedback on it and suggestions ? |
For JSON parser, easiest is probably nlohmann-json Nevertheless, why would we use AMI to access (from Falaise), the CondDB? Could we get confirmation from the AMI developers that this is how it's used in ATLAS to access (from Athena, their Falaise equivalent) actual conditions from the Oracle/COOL/SQLite DBs? It just feels awkward and inefficient to use a web API that will ultimately just query the DB at Lyon. |
TODO: specifications for:
|
Kicked off by @emchauve 's mail to the Software list:
The text was updated successfully, but these errors were encountered: