Hi,
Not embarking on the language war train, I think this is a good addition
and we should go forward with it.
Apart from that - and this is probably a separate discussion - I also
think we should split oak-run up as it is getting too heavy. Couldn't we
make it into a rather bare bone OSGi container where users could select
what to run with on the command line (package manager like, that is)?
E.g. whether to have benchmarks, scalability, server, ... With such a
setup we could also make the languages a scripting console supports
pluggable while at the same time keeping the oak-run module clean and mean.
Michael
On 22.5.14 6:37 , Chetan Mehrotra wrote:
Hi,
Currently Marcel has implemented a Java based basic shell access to
Oak in OAK-1805. I have reworked the logic and used Groovysh [1] to
provide a richer shell experience.
* The shell is branded for Oak
* Makes use of all the features provided by groovysh command
completion, history, colored output etc
* Full power of Groovy!
* Most of current command implemented by Marcel ported
* Ability to execute script at command line itself similar to Mongo shell
Things to considers
* Requires groovy jar to be embedded increasing the size ~6 mb
* Some of commands need to be written in groovy
Sample output
{noformat}
$ java -jar oak-run-1.1-SNAPSHOT.jar console mongodb://localhost:27017/oak
Apache Jackrabbit Oak 1.1-SNAPSHOT
Jackrabbit Oak Shell (Apache Jackrabbit Oak 1.1-SNAPSHOT, JVM: 1.6.0_45)
Type ':help' or ':h' for help.
-------------------------------------------------------------------------------------------------------------------
/> ls
:async
apps
bin
etc
/> cd
:async apps bin etc
home jcr:system
libs oak:index rep:policy rep:repoPolicy
system tmp
var
/> cd var
/var>
{noformat}
Adding groovy would increase size of oak-run by ~6 mb (from 27 to 34)
and also requires some of the code logic to be implemented in Groovy,
So would it be ok to apply the patch
Thoughts?
Chetan Mehrotra
PS: Details are also provided in bug note
[1] http://groovy.codehaus.org/Groovy+Shell
[2] http://groovy.codehaus.org/JSR-223+access+to+other+JVM+languages