You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Jean-Baptiste Onofré <jb...@nanthrax.net> on 2011/10/18 12:14:23 UTC

[PROPOSAL] New Karaf commands norm

Hi all,

in order to be consistent, I would like to apply the same "norm" for all 
Karaf commands.

I propose the following:

1/ all command scope should be singular (features:* become feature:*, 
bundles:* become bundle:*)
2/ command name separator is -. For instance, config:propdel become 
config:prop-del
3/ "fine grained commands" should be respect the command-action format. 
For instance, features:addUrl become feature:url-add, feature:url-list

WDYT ?

Regards
JB
-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] New Karaf commands norm

Posted by mikevan <mv...@comcast.net>.
+1 for this change on the 3.x branch. 

-1 for this change on the 2.x branch. We should keep the commands the same
for the 2.x branch.  Because of the large number of users of 2.x, I can
foresee an issue with folks who use gogo macros where they would be upset if
their macros stop working because of this change.  


Jean-Baptiste Onofré wrote:
> 
> Hi all,
> 
> in order to be consistent, I would like to apply the same "norm" for all 
> Karaf commands.
> 
> I propose the following:
> 
> 1/ all command scope should be singular (features:* become feature:*, 
> bundles:* become bundle:*)
> 2/ command name separator is -. For instance, config:propdel become 
> config:prop-del
> 3/ "fine grained commands" should be respect the command-action format. 
> For instance, features:addUrl become feature:url-add, feature:url-list
> 
> WDYT ?
> 
> Regards
> JB
> -- 
> Jean-Baptiste Onofré
> jbonofre@
> http://blog.nanthrax.net
> Talend - http://www.talend.com
> 


-----
Mike Van  (All links open in new tabs)
Committer - Kalumet 

Atraxia Technologies 

NCI Inc 

Mike Van's Open Source Technologies Blog 
--
View this message in context: http://karaf.922171.n3.nabble.com/PROPOSAL-New-Karaf-commands-norm-tp3430815p3431306.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: [PROPOSAL] New Karaf commands norm

Posted by "Jamie G." <ja...@gmail.com>.
+1 for command consistency.

On Tue, Oct 18, 2011 at 7:57 AM, Achim Nierbeck <bc...@googlemail.com> wrote:
> +1 on those commands
>
> regards, Achim
>
> 2011/10/18 Andreas Pieber <an...@gmail.com>
>
>> My comment on the rename of the admin service could be applied here too; I
>> think it makes sense to be consistent here and if we don't risk to setup
>> some existing users we could never evolve and will stuck forever with old
>> stuff :-(
>>
>> Kind regards,
>> Andreas
>>
>> On Tue, Oct 18, 2011 at 12:14, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>
>> > Hi all,
>> >
>> > in order to be consistent, I would like to apply the same "norm" for all
>> > Karaf commands.
>> >
>> > I propose the following:
>> >
>> > 1/ all command scope should be singular (features:* become feature:*,
>> > bundles:* become bundle:*)
>> > 2/ command name separator is -. For instance, config:propdel become
>> > config:prop-del
>> > 3/ "fine grained commands" should be respect the command-action format.
>> For
>> > instance, features:addUrl become feature:url-add, feature:url-list
>> >
>> > WDYT ?
>> >
>> > Regards
>> > JB
>> > --
>> > Jean-Baptiste Onofré
>> > jbonofre@apache.org
>> > http://blog.nanthrax.net
>> > Talend - http://www.talend.com
>> >
>>
>
>
>
> --
> --
> *Achim Nierbeck*
>
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>  Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
>

Re: [PROPOSAL] New Karaf commands norm

Posted by Achim Nierbeck <bc...@googlemail.com>.
+1 on those commands

regards, Achim

2011/10/18 Andreas Pieber <an...@gmail.com>

> My comment on the rename of the admin service could be applied here too; I
> think it makes sense to be consistent here and if we don't risk to setup
> some existing users we could never evolve and will stuck forever with old
> stuff :-(
>
> Kind regards,
> Andreas
>
> On Tue, Oct 18, 2011 at 12:14, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
> > Hi all,
> >
> > in order to be consistent, I would like to apply the same "norm" for all
> > Karaf commands.
> >
> > I propose the following:
> >
> > 1/ all command scope should be singular (features:* become feature:*,
> > bundles:* become bundle:*)
> > 2/ command name separator is -. For instance, config:propdel become
> > config:prop-del
> > 3/ "fine grained commands" should be respect the command-action format.
> For
> > instance, features:addUrl become feature:url-add, feature:url-list
> >
> > WDYT ?
> >
> > Regards
> > JB
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>



-- 
--
*Achim Nierbeck*


Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>  Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Re: [PROPOSAL] New Karaf commands norm

Posted by "Kripalani, Raul" <ra...@fusesource.com>.
Hi,

Just an idea. To minimise possible user frustration, the first time in each
shell session that the osgi: command prefix is used, we could output a
message in the shell telling the user that they should use instance:
instead, rather than just showing the standard "command not found" which
could puzzle them if they haven't read the docs.

This could be a warning in 3.0.x, with an alias from osgi: to instance:, and
in 3.1.x we could remove osgi: altogether...

Regards,
Raúl.

On 18 October 2011 11:18, Andreas Pieber <an...@gmail.com> wrote:

> My comment on the rename of the admin service could be applied here too; I
> think it makes sense to be consistent here and if we don't risk to setup
> some existing users we could never evolve and will stuck forever with old
> stuff :-(
>
> Kind regards,
> Andreas
>
> On Tue, Oct 18, 2011 at 12:14, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
> > Hi all,
> >
> > in order to be consistent, I would like to apply the same "norm" for all
> > Karaf commands.
> >
> > I propose the following:
> >
> > 1/ all command scope should be singular (features:* become feature:*,
> > bundles:* become bundle:*)
> > 2/ command name separator is -. For instance, config:propdel become
> > config:prop-del
> > 3/ "fine grained commands" should be respect the command-action format.
> For
> > instance, features:addUrl become feature:url-add, feature:url-list
> >
> > WDYT ?
> >
> > Regards
> > JB
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>

Re: [PROPOSAL] New Karaf commands norm

Posted by Andreas Pieber <an...@gmail.com>.
My comment on the rename of the admin service could be applied here too; I
think it makes sense to be consistent here and if we don't risk to setup
some existing users we could never evolve and will stuck forever with old
stuff :-(

Kind regards,
Andreas

On Tue, Oct 18, 2011 at 12:14, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:

> Hi all,
>
> in order to be consistent, I would like to apply the same "norm" for all
> Karaf commands.
>
> I propose the following:
>
> 1/ all command scope should be singular (features:* become feature:*,
> bundles:* become bundle:*)
> 2/ command name separator is -. For instance, config:propdel become
> config:prop-del
> 3/ "fine grained commands" should be respect the command-action format. For
> instance, features:addUrl become feature:url-add, feature:url-list
>
> WDYT ?
>
> Regards
> JB
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: [PROPOSAL] New Karaf commands norm

Posted by Guillaume Nodet <gn...@gmail.com>.
+1

On Thu, Dec 1, 2011 at 14:31, Ioannis Canellos <io...@gmail.com> wrote:
> I've been thinking about the verb noun idea and here are some thoughts:
>
> Autocompletion wise it might be better to have a noun verb convention. So
> you initially can limit the completion scope to the noun you are interested
> and see all the available actions. The oposite might be a bit noisy.
>
> Also, with the introduction of sub shells it might work to our interest to
> have a noun verb convention, since it would easily allow us to nest
> subshells based on the noun (if we decide to implement something like this).
>
> Thoughts?
>
>
> --
> *Ioannis Canellos*
> *
> FuseSource <http://fusesource.com>
>
> **
> Blog: http://iocanel.blogspot.com
> **
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> Apache Camel <http://camel.apache.org/> Committer
> Apache ServiceMix <http://servicemix.apache.org/>  Committer
> Apache Gora <http://incubator.apache.org/gora/> Committer
> Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
> *
>



-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: [PROPOSAL] New Karaf commands norm

Posted by James Strachan <ja...@fusesource.com>.
+1

I've found just doing 'help' can be quite confusing when you have
quite a few nouns and verbs inside a single set of karaf commands. Its
mentally harder to grok things sorted in verb order as all the nouns
get jumbled up together. Just like javadoc; we tend to find a class
first then list the operations on it - not look at all methods on
everything then manually filter for the class we're interested in.

Some nice examples would be things like camel:endpoint / camel:route /
activemq:queue / activemq:topic.  It would be nice to quickly see the
verbs available on a noun (camel:endpoint).

foo@bar> help camel
endpoint:create
endpoint:ls
...
route:create
route:ls
...

foo@bar> help camel:endpoint
create
ls
....
etc

Or to use nouns as kinda sub-shells not unlike pseudo mini-file systems...

foo@bar> shell activemq:queue
foo@bar> cd Products
foo@bar> ls
Electronics/ Books/ Updates

foo@bar> create Food
foo@bar> ls
Electronics/ Books/ Food Updates

foo@bar> cd ..
foo@bar> ls
Products/ Orders/ Audit/

foo@bar> create Products.Food.Cheese
foo@bar> purge Products.Food.Beer
About to purge 1024 message(s) from queue Products.Food.Beer
are you sure (Y/n): Y
queue purged.

foo@bar> exit

# lets be really explicit

foo@bar> activemq:queue:create Foo.Bar

# if queue is not already defined this should be fine though...

foo@bar> queue:create Foo.Bar



On 1 December 2011 13:31, Ioannis Canellos <io...@gmail.com> wrote:
> I've been thinking about the verb noun idea and here are some thoughts:
>
> Autocompletion wise it might be better to have a noun verb convention. So
> you initially can limit the completion scope to the noun you are interested
> and see all the available actions. The oposite might be a bit noisy.
>
> Also, with the introduction of sub shells it might work to our interest to
> have a noun verb convention, since it would easily allow us to nest
> subshells based on the noun (if we decide to implement something like this).
>
> Thoughts?
>
>
> --
> *Ioannis Canellos*
> *
> FuseSource <http://fusesource.com>
>
> **
> Blog: http://iocanel.blogspot.com
> **
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> Apache Camel <http://camel.apache.org/> Committer
> Apache ServiceMix <http://servicemix.apache.org/>  Committer
> Apache Gora <http://incubator.apache.org/gora/> Committer
> Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
> *
>



-- 
James
-------
FuseSource
Email: james@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration and Messaging

Re: [PROPOSAL] New Karaf commands norm

Posted by Claus Ibsen <cl...@gmail.com>.
+1

I thought of this the other day, when I was demoing Apache SMX with
Camel, and that Camel shell commands, have the names in the wrong
order, which bugged me.



On Thu, Dec 1, 2011 at 2:31 PM, Ioannis Canellos <io...@gmail.com> wrote:
> I've been thinking about the verb noun idea and here are some thoughts:
>
> Autocompletion wise it might be better to have a noun verb convention. So
> you initially can limit the completion scope to the noun you are interested
> and see all the available actions. The oposite might be a bit noisy.
>
> Also, with the introduction of sub shells it might work to our interest to
> have a noun verb convention, since it would easily allow us to nest
> subshells based on the noun (if we decide to implement something like this).
>
> Thoughts?
>
>
> --
> *Ioannis Canellos*
> *
> FuseSource <http://fusesource.com>
>
> **
> Blog: http://iocanel.blogspot.com
> **
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> Apache Camel <http://camel.apache.org/> Committer
> Apache ServiceMix <http://servicemix.apache.org/>  Committer
> Apache Gora <http://incubator.apache.org/gora/> Committer
> Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
> *



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: [PROPOSAL] New Karaf commands norm

Posted by Ioannis Canellos <io...@gmail.com>.
I've been thinking about the verb noun idea and here are some thoughts:

Autocompletion wise it might be better to have a noun verb convention. So
you initially can limit the completion scope to the noun you are interested
and see all the available actions. The oposite might be a bit noisy.

Also, with the introduction of sub shells it might work to our interest to
have a noun verb convention, since it would easily allow us to nest
subshells based on the noun (if we decide to implement something like this).

Thoughts?


-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache Camel <http://camel.apache.org/> Committer
Apache ServiceMix <http://servicemix.apache.org/>  Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
*

Re: [PROPOSAL] New Karaf commands norm

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Gert,

thanks for your feedback.

My comments inline:

> We can definitely do this for the Karaf 3.x versions.  Personally, I'm more
> in favor of a clean cut approach instead of providing aliases for
> everything, I think it's more a matter of communicating the change to our
> users clearly.  How about a doing real migration guide document for Karaf 3
> that goes along with the release mails we sent out to the users mailing
> lists, gets included with the download links, gets blogged together with the
> typical 'xyz released' entries, ... ?

+1, migration guide, a real cleanup (to avoid to have to support things 
for a long time ;)) is better.

>
> Adding a warning as Raul suggested might be a good idea as well, as long as
> we make sure to get rid of those warning again as soon as possible (e.g. for
> Karaf 3.1) to avoid dragging our entire history along with us over time.

I think that migration guide makes more sense, and should be enough.

>
> Looking at the proposed command format and if we're going to change things
> anyway, I'm also wondering if we should reverse the verb-noun order.
>   Somehow, feature:list-url and feature:add-url read a bit more natural in my
> mind.  Also, this would be more in line with feature:install and
> bundle:start that also have the verb in first position (though we also have
> a bundle:info that me might have to call bundle:show-info instead then).

OK with that. It just means that, config:propdel will become 
config:del-prop for instance.

>
> (Sorry for being extremely old fashioned, but the AS/400 (oh, sorry IBM,
> it's called System i now, right?) has this scheme of verbs (WRK, DSP, DLT,
> ...) and nouns (FIL, OBJ, WTR, ...) for the system commands as well and
> usually allows you to find the right command by just combining these things,
> so the previous proposal goes along the same lines - just being a more
> modern age alternative to the same thing -- If we keep the unix-like aliases
> around as well, we can make all these dinosaurs like myself feel at home ;))

;)

Regards
JB

>
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
> On Tue, Oct 18, 2011 at 12:14 PM, Jean-Baptiste Onofré<jb...@nanthrax.net>wrote:
>
>> Hi all,
>>
>> in order to be consistent, I would like to apply the same "norm" for all
>> Karaf commands.
>>
>> I propose the following:
>>
>> 1/ all command scope should be singular (features:* become feature:*,
>> bundles:* become bundle:*)
>> 2/ command name separator is -. For instance, config:propdel become
>> config:prop-del
>> 3/ "fine grained commands" should be respect the command-action format. For
>> instance, features:addUrl become feature:url-add, feature:url-list
>>
>> WDYT ?
>>
>> Regards
>> JB
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] New Karaf commands norm

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,


We can definitely do this for the Karaf 3.x versions.  Personally, I'm more
in favor of a clean cut approach instead of providing aliases for
everything, I think it's more a matter of communicating the change to our
users clearly.  How about a doing real migration guide document for Karaf 3
that goes along with the release mails we sent out to the users mailing
lists, gets included with the download links, gets blogged together with the
typical 'xyz released' entries, ... ?

Adding a warning as Raul suggested might be a good idea as well, as long as
we make sure to get rid of those warning again as soon as possible (e.g. for
Karaf 3.1) to avoid dragging our entire history along with us over time.

Looking at the proposed command format and if we're going to change things
anyway, I'm also wondering if we should reverse the verb-noun order.
 Somehow, feature:list-url and feature:add-url read a bit more natural in my
mind.  Also, this would be more in line with feature:install and
bundle:start that also have the verb in first position (though we also have
a bundle:info that me might have to call bundle:show-info instead then).

(Sorry for being extremely old fashioned, but the AS/400 (oh, sorry IBM,
it's called System i now, right?) has this scheme of verbs (WRK, DSP, DLT,
...) and nouns (FIL, OBJ, WTR, ...) for the system commands as well and
usually allows you to find the right command by just combining these things,
so the previous proposal goes along the same lines - just being a more
modern age alternative to the same thing -- If we keep the unix-like aliases
around as well, we can make all these dinosaurs like myself feel at home ;))


Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/


On Tue, Oct 18, 2011 at 12:14 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi all,
>
> in order to be consistent, I would like to apply the same "norm" for all
> Karaf commands.
>
> I propose the following:
>
> 1/ all command scope should be singular (features:* become feature:*,
> bundles:* become bundle:*)
> 2/ command name separator is -. For instance, config:propdel become
> config:prop-del
> 3/ "fine grained commands" should be respect the command-action format. For
> instance, features:addUrl become feature:url-add, feature:url-list
>
> WDYT ?
>
> Regards
> JB
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>