DMTN-258: Consolidated DB Implementation

  • William O'Mullane and KT Lim

Latest Revision: 2023-04-06

Note

This technote is a work-in-progress.

1 Abstract

There needs to be a summit relational DB which holds items such as the exposure log. In addition a service triggered by SAL needs to populate some tables in that DB and update certain rows. We have started to consider how this will be implemented.

2 Database

The Chile DevOps supported postgress instance will be used for this database. Schema is defined in the schema repository allowing us to generate the SQL from the description in the repo. Currently on ‘u/ktl/add-summit-schema’ branch of SDM Schema repo <https://github.com/lsst/sdm_schemas/tree/main/yml>

3 ConsDB Service

A simple service is required this will: - be deployed using Phalanx - not, initially at least, be a CSC - listen to a limited number of CSC events around image capture - based on those events query the EFD to get information - write the gather information to the tables such as exposure log in the ConsDB - update appropriate table in CBD such as OBSLocTap table to indicate an observation was made or not

This will run in async and multi-threaded mode. Updates for example are not a high priority and should not delay the exposure entry creation. Testing can use SQLLite implying we use SQL Alchemy (1.4 or higher).

There is an acknowledged potential overlap with the header service - this will be considered at a later stage.

We will commence work on this April 7 2023 in cdb_service <https://github.com/lsst-dm/cdb_service> repo.