Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1875

server mode for CLI

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.1.0
    • None
    • CLI
    • None

    Description

      A server behavior for Daffodil's CLI is needed.

      This allows many applications of daffodil parsing and unparsing to be performed but starting the daffodil CLI only once and loading the schemas only once.

      One simple way to do this is rather than executing a command and terminating, the CLI would enter a looping mode where it reads a command line from stdin, executes it, and repeats until EOF on the stdin.

      An alternative, but more complex thing to do is to implement the Language Server Protocol, which is intended to be for long-running servers that do things like compile and build.

      Note that this also adds extra complexity, extra socket permissions, and
      potentially has issues with processor separation if multiple processes
      can communicate with the same server. So this has security implications
      as well. Might be fine for the CLI, but probably not for Java/Scala APIs.

      sbt has a server mode:

      https://developer.lightbend.com/blog/2017-11-30-sbt-1-1-0-RC1-sbt-server/#sbt-server

      The LSP specification:

      https://microsoft.github.io/language-server-protocol/specification

      See also DAFFOGIL-1563 which is about plug-ins that might want to make use of a server-mode long-running daffodil instance. Such a plug in might want to use an LSP-based Daffodil server.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: