Direct ICAT communication
Step 1 towards solving #2848 (closed)
There are now two ICAT clients with the same API:
-
bliss.icat.client.IcatClient: communicates directly with ICAT -
bliss.icat.client.IcatTangoProxy: communicates through tango servers
IcatClient is used when configured in the beacon configuration (same controller as for configuring metadata gathering)
icat_servers:
metadata_urls: [URL1, URL2]
elogbook_url: URL3
elogbook_token: elogbook-00000000-0000-0000-0000-000000000000
The default URL prefix is "tcp://" for the metadata and "https://" for the e-logbook.
BLISS will fall back to IcatTangoProxy when IcatClient is not configured. As a reminder, it requires two TANGO devices per BLISS session with names "id00/metaexp/session_name" and "id00/metadata/session_name". The configuration is done in the TANGO device class properties.
Implementation
-
bliss.icat.client.IcatClient: direct communication with ICAT: e-logbook and metadata. Has oneIcatElogbookClientand oneIcatMessagingClient. -
bliss.icat.client.elogbook.IcatElogbookClient: client for the e-logbook part of the ICAT+ REST API. -
bliss.icat.client.metadata.IcatMetadataClient: client for storing dataset metadata in ICAT. Has oneIcatMessagingClient. -
bliss.icat.client.messaging.IcatMessagingClient: client for the ICAT message broker (currently activemq). It also uses the broker's REST server (jolokia) for monitoring.
Maintenance
Apart from being able to add failure handling, we have huge improvements in terms of maintenance.
Code:
-
IcatTangoProxyrequires ~800 lines of code + all the code in the tango_metadata project. -
IcatClientrequires ~400 lines of code.
Infrastructure:
-
IcatTangoProxyrequires 2 tango devices per BLISS session per beamline. -
IcatClientrequires 1 ICATmeta configuration per beamline (see above).
Edited by Wout De Nolf