I created DAFFODIL-1875 for this enhancement request.

________________________________
From: Steve Lawrence <slawre...@apache.org>
Sent: Tuesday, January 16, 2018 7:49:46 AM
To: dev@daffodil.apache.org; Taylor Wise
Subject: Re: poor-man's daffodil-server idea

Yeah, seems like a reasonable way to do it. Only thing I might suggest
is that rather than using something like stdin, use an open standard.
SBT 1.1.0 added a 'server' concept [1] that sounds somewhat similar to
what you describe. It uses the Language Server Protocol (3.0) [2]. Not
sure if that's appropriate for use with something like Daffodil, but
something like that that is a formal standard would probably make
implementing easier and also make integrating into IDE's that support
LSP easier.

Not sure this is high priority though. Sounds like a future/deferred thing.

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.

- Steve

[1]
https://developer.lightbend.com/blog/2017-11-30-sbt-1-1-0-RC1-sbt-server/#sbt-server
[2] https://microsoft.github.io/language-server-protocol/specification


On 01/15/2018 03:47 PM, Taylor Wise wrote:
> Sounds reasonable and useful. Couldn't you go so far as to have these
> instances of Daffodil ready to execute and running separately anyway? The
> CLI would then just be an interface to load schema's or more so to just
> send data to it and receive results.
>
> On Jan 15, 2018 12:21 PM, "Mike Beckerle" <mbecke...@tresys.com> wrote:
>
>> What if we changed the Daffodil CLI to have a --server mode.
>>
>>
>> In this mode the CLI would reads command-lines from std input, then does
>> what it does now for a command line, but at the end it would go back to
>> reading another command from std input, and stay in that loop until EOF on
>> std input.
>>
>>
>> This would let people build quite efficient shell scripts that avoid most
>> Daffodil startup overheads and would be reasonably efficient even for quite
>> small input data items.
>>
>>
>> I suppose we'd want this to recognize that a schema is already loaded or
>> already compiled so as to avoid that overhead on repeated uses of that
>> schema/binary. Other than that this seems simple and useful.
>>
>>
>> Thoughts?
>>
>>
>>
>

Reply via email to