-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
✨NNew feature or requestNew feature or request
Description
New Feature Summary
Running a CLAMS as a stateless HTTP app makes app invocation and data transfer clean and standardized, and most importantly, language-agnostic interface. However it comes with cost of computational overhead of running server processes and handling TCP communication.
At the moment, all CLAMS apps developed in the team is written under Python, with the support of SDK, so to provide an additional interface to users maybe for quicker test/debug, we'd like to include a wrapper for unix-shell command line interface, just like we are providing flask wrapper to turn the app code into a HTTP web app.
Basic idea;
- When a developer uses
clams developto start a new app, it generatesapp.py: main implementation of the App classmetadata.py: defines app metadata and runtime parameters- (new)
cli.py: a completely unmanned interpreter ofmetadata.py+app.pyto provide a standard POSIX CLI
- users can use
app.pyto spin up a webapp and call the app with URL plus query string for runtime parameters, or directly callcli.pywith shell arguments for runtime parameters - input MMIF and output MMIF should just use stdin and stdout respectively.
Some random notes;
- CLI implementation is not language-agnostic, hence
cli.pycan be a recommended implementation, but shouldn't be a requirement for CLAMS app specification. - as a python program (probably based on
arg_parsermodule), there will be some basic expectation for some flags (--help,--version, etc) but since we don't put any constraints for app developers to pick a parameter name (as long as it is URL-compatible), those basic flags should be disabled (an app can takeversion=runtime parameter, for example). - as an equivalent to
GETrequest, users can just runmetadata.pyto get JSON-formatted app metadata.
Will add more as we discuss more details.
Related
No response
Alternatives
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
✨NNew feature or requestNew feature or request
Type
Projects
Status
Done