You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2018/01/16 17:25:01 UTC

[jira] [Created] (DAFFODIL-1875) server mode for CLI

Michael Beckerle created DAFFODIL-1875:
------------------------------------------

             Summary: server mode for CLI
                 Key: DAFFODIL-1875
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1875
             Project: Daffodil
          Issue Type: Improvement
          Components: CLI
    Affects Versions: 2.1.0
            Reporter: Michael Beckerle
             Fix For: deferred


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)