Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5437

Add a persistence-dependent namespace when running CLI commands

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Later
    • None
    • None
    • run

    Description

      Commands in oak-run currently live in a flat namespace. If a command is specific to only one implementation, it will leave along other implementation-specific commands without any means of distinguishing what belongs where.

      I would like to add a layer of indirection to the oak-run command line interface, so to parse commands in the following fashion:

      oak-run segment debug /path/to/folder
      oak-run mongo debug mongodb://host:12345
      oak-run rdb debug jdbc:oracle:oci8:scott/tiger@myhost
      

      In this scenario, oak-run would become a simple entry point that would delegate to implementation-specific command line utilities based on the first argument. In the previous example, segment, mongo and rdb would delegate to three different implementation specific CLI utilities. Each of these CLI utilities will understand the debug command and will collect command-line parameters as it sees fit.

      If the code for a command is so generic that can be reused from different commands, it can be parameterised and reused from different implementation-specific commands.

      The benefit of this approach is that we can start moving commands closer to the implementations. This approach would benefit oak-run as well, which is overloaded with many commands from many different implementations.

      Attachments

        Activity

          People

            frm Francesco Mari
            frm Francesco Mari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: