Skip to content

Upgrade mdscts to use SQLite? #3051

Description

@mwinkel-dev

Affiliation
MIT PSFC

Description
MDSplus includes a utility, mdscts, that is used to manage information about CAMAC crates and modules. It does so by creating its own custom text-based databases, cts.db and crate.db. Consideration should be given to replacing those custom databases with SQLite database files.

This proposal has pros and cons:

  • Pro: Using SQLite would likely make the mdscts utility more robust and easier to maintain.
  • Con: Very few customers still use CAMAC, plus the existing mdscts works. So as the old adage states, "If it ain't broke, don't fix it." Furthermore, PSFC no longer has CAMAC crates or devices, thus testing new software would have to be done by the few customers that still use CAMAC. Upgrading to SQLite thus might have bad ROI. Stated another way, if we allocated N development hours to the customers that use CAMAC, they might prefer that we spend that N hours enhancing other features of MDSplus instead of upgrading mdscts to use SQLite.

And some notes / questions:

  • The goal should be to simplify the mdscts utility. The prototype listed in the "Example" section instead significantly expands the code base.
  • Should a revised mdscts only use SQLite? Or should it also read / write to existing crate.db and cts.db files (as per the prototype)?
  • If the new mdscts only uses SQLite, then a separate conversion utility will be needed so that the few customers that use CAMAC can convert their crate.db and cts.db files into the SQLite equivalents.
  • However, if backwards compatibility dictates that the revised mdscts also read / write crate.db and cts.db files, what is the benefit of adding SQLite?

Example
A prototype can be found in PR #3032. However, that was generated with AI and not tested, thus should not be used "as is".

Additional context
For more detail about mdcts, refer to Issues #3031 and #3035, plus the associated PRs #3037 and #3038.

Metadata

Metadata

Assignees

No one assigned

    Labels

    devicesRelates to devices (c devices, tdi devices, python devices, java devices, device_support, etc)featureIndicates new feature requests or implementations

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions