You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Daniel Resare <no...@metamatrix.se> on 2003/09/22 23:34:17 UTC

[Daemon] butchering the daemon api

As people talk about an 1.0 release about The Jakarta Commons Daemon
project I have tried to think hard about the Daemon api as it is exposed
in the public interfaces in org.apache.commons.daemon.

I believe that now is the right time to reform the API since it seems
like no one(*) is using it right now. (I base this on the fact that in
addition to implementing the Daemon interface, your daemon currently
needs to have an undocumented init(String[]) method. This breaks the
Demo daemons included in the projects).

Since there is little documentation and no implementation explaining
most of the complexity of the API and no one on this list have answered
to my queries about it I propse that we remove all but the basic
functionality exercised by the tomcat Bootstrap class. If anyone wants
to take repsonsiblity over the extended functionality, they can re-add
it to the API later on, as that would be an backward compatible change.

- Remove the DaemonListener. The daemon listener is undocumented and
unreferenced. If anyone want to listen to daemons control events in the
future, please feel free to add it document it and write sample code
that uses it.

- Remove the DaemonPermission as the current Daemon invoker
implementation doesn't use it.

- Remove all the fail() methods in DaemonController that doesn't take an
Exception as an argument, as the new Exception constructors that takes
an embedded Throwable maked it possible to create generic Exceptions
that combine another Trhowable with a message.

That's all the obvious removals IMHO. I'm working on documentation for
everything that isn't mentioned above.

cheers
/noa


*) Without the patch at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23242 you need an
undocumented init(String[]) method in your Daemon class to make it start
up at all. The fact that his seems to have been unnoticed for some
months makes me quite confident that tomcat is the only code using the
commons-daemon code.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [Daemon] butchering the daemon api

Posted by Daniel Resare <no...@metamatrix.se>.
tor 2003-09-25 klockan 17.32 skrev jean-frederic clere:
> Daniel Resare wrote:
> > As people talk about an 1.0 release about The Jakarta Commons Daemon
> > project I have tried to think hard about the Daemon api as it is exposed
> > in the public interfaces in org.apache.commons.daemon.
> > 
> > I believe that now is the right time to reform the API since it seems
> > like no one(*) is using it right now. (I base this on the fact that in
> > addition to implementing the Daemon interface, your daemon currently
> > needs to have an undocumented init(String[]) method. This breaks the
> > Demo daemons included in the projects).
> 
> I am using it. So I am -1 in removing it.

After having re-read what I wrote I found that I wrote some things I
didn't mean. My idea wasn't to remove everything, but to do the three
changes mentioned after dash (-) below.

> > 
> > Since there is little documentation and no implementation explaining
> > most of the complexity of the API and no one on this list have answered
> > to my queries about it I propse that we remove all but the basic
> > functionality exercised by the tomcat Bootstrap class. If anyone wants
> > to take repsonsiblity over the extended functionality, they can re-add
> > it to the API later on, as that would be an backward compatible change.
> 
> Removing complex things because you do not understand them is not a very nice 
> behaviour.

I agree on that, however when there is no documentation or
implementation using a specific API feature and it is not obvious from
the context of the feature what it does I think that removing stuff can
be a good idea. An example of this is the DaemonListener interface.

However, if you feel that you understand it, and you want to add
documentation or an implementation then no one is happier than I am
about that.

> > 
> > - Remove the DaemonListener. The daemon listener is undocumented and
> > unreferenced. If anyone want to listen to daemons control events in the
> > future, please feel free to add it document it and write sample code
> > that uses it.
> > 
> > - Remove the DaemonPermission as the current Daemon invoker
> > implementation doesn't use it.
> > 
> > - Remove all the fail() methods in DaemonController that doesn't take an
> > Exception as an argument, as the new Exception constructors that takes
> > an embedded Throwable maked it possible to create generic Exceptions
> > that combine another Trhowable with a message.
> > 
> > That's all the obvious removals IMHO. I'm working on documentation for
> > everything that isn't mentioned above.
> 
> Please submit me a copy. I am also working on the documentation.

Feel free to have a look at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23368 where I've
attached a patch containing the documentation I've written.

cheers/noa


Re: [Daemon] butchering the daemon api

Posted by Daniel Resare <no...@metamatrix.se>.
tor 2003-09-25 klockan 17.32 skrev jean-frederic clere:
> Daniel Resare wrote:
> > As people talk about an 1.0 release about The Jakarta Commons Daemon
> > project I have tried to think hard about the Daemon api as it is exposed
> > in the public interfaces in org.apache.commons.daemon.
> > 
> > I believe that now is the right time to reform the API since it seems
> > like no one(*) is using it right now. (I base this on the fact that in
> > addition to implementing the Daemon interface, your daemon currently
> > needs to have an undocumented init(String[]) method. This breaks the
> > Demo daemons included in the projects).
> 
> I am using it. So I am -1 in removing it.

After having re-read what I wrote I found that I wrote some things I
didn't mean. My idea wasn't to remove everything, but to do the three
changes mentioned after dash (-) below.

> > 
> > Since there is little documentation and no implementation explaining
> > most of the complexity of the API and no one on this list have answered
> > to my queries about it I propse that we remove all but the basic
> > functionality exercised by the tomcat Bootstrap class. If anyone wants
> > to take repsonsiblity over the extended functionality, they can re-add
> > it to the API later on, as that would be an backward compatible change.
> 
> Removing complex things because you do not understand them is not a very nice 
> behaviour.

I agree on that, however when there is no documentation or
implementation using a specific API feature and it is not obvious from
the context of the feature what it does I think that removing stuff can
be a good idea. An example of this is the DaemonListener interface.

However, if you feel that you understand it, and you want to add
documentation or an implementation then no one is happier than I am
about that.

> > 
> > - Remove the DaemonListener. The daemon listener is undocumented and
> > unreferenced. If anyone want to listen to daemons control events in the
> > future, please feel free to add it document it and write sample code
> > that uses it.
> > 
> > - Remove the DaemonPermission as the current Daemon invoker
> > implementation doesn't use it.
> > 
> > - Remove all the fail() methods in DaemonController that doesn't take an
> > Exception as an argument, as the new Exception constructors that takes
> > an embedded Throwable maked it possible to create generic Exceptions
> > that combine another Trhowable with a message.
> > 
> > That's all the obvious removals IMHO. I'm working on documentation for
> > everything that isn't mentioned above.
> 
> Please submit me a copy. I am also working on the documentation.

Feel free to have a look at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23368 where I've
attached a patch containing the documentation I've written.

cheers/noa


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [Daemon] butchering the daemon api

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Daniel Resare wrote:
> As people talk about an 1.0 release about The Jakarta Commons Daemon
> project I have tried to think hard about the Daemon api as it is exposed
> in the public interfaces in org.apache.commons.daemon.
> 
> I believe that now is the right time to reform the API since it seems
> like no one(*) is using it right now. (I base this on the fact that in
> addition to implementing the Daemon interface, your daemon currently
> needs to have an undocumented init(String[]) method. This breaks the
> Demo daemons included in the projects).

I am using it. So I am -1 in removing it.

> 
> Since there is little documentation and no implementation explaining
> most of the complexity of the API and no one on this list have answered
> to my queries about it I propse that we remove all but the basic
> functionality exercised by the tomcat Bootstrap class. If anyone wants
> to take repsonsiblity over the extended functionality, they can re-add
> it to the API later on, as that would be an backward compatible change.

Removing complex things because you do not understand them is not a very nice 
behaviour.

> 
> - Remove the DaemonListener. The daemon listener is undocumented and
> unreferenced. If anyone want to listen to daemons control events in the
> future, please feel free to add it document it and write sample code
> that uses it.
> 
> - Remove the DaemonPermission as the current Daemon invoker
> implementation doesn't use it.
> 
> - Remove all the fail() methods in DaemonController that doesn't take an
> Exception as an argument, as the new Exception constructors that takes
> an embedded Throwable maked it possible to create generic Exceptions
> that combine another Trhowable with a message.
> 
> That's all the obvious removals IMHO. I'm working on documentation for
> everything that isn't mentioned above.

Please submit me a copy. I am also working on the documentation.

> 
> cheers
> /noa
> 
> 
> *) Without the patch at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23242 you need an
> undocumented init(String[]) method in your Daemon class to make it start
> up at all. The fact that his seems to have been unnoticed for some
> months makes me quite confident that tomcat is the only code using the
> commons-daemon code.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 



Re: [Daemon] butchering the daemon api

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Daniel Resare wrote:
> As people talk about an 1.0 release about The Jakarta Commons Daemon
> project I have tried to think hard about the Daemon api as it is exposed
> in the public interfaces in org.apache.commons.daemon.
> 
> I believe that now is the right time to reform the API since it seems
> like no one(*) is using it right now. (I base this on the fact that in
> addition to implementing the Daemon interface, your daemon currently
> needs to have an undocumented init(String[]) method. This breaks the
> Demo daemons included in the projects).

I am using it. So I am -1 in removing it.

> 
> Since there is little documentation and no implementation explaining
> most of the complexity of the API and no one on this list have answered
> to my queries about it I propse that we remove all but the basic
> functionality exercised by the tomcat Bootstrap class. If anyone wants
> to take repsonsiblity over the extended functionality, they can re-add
> it to the API later on, as that would be an backward compatible change.

Removing complex things because you do not understand them is not a very nice 
behaviour.

> 
> - Remove the DaemonListener. The daemon listener is undocumented and
> unreferenced. If anyone want to listen to daemons control events in the
> future, please feel free to add it document it and write sample code
> that uses it.
> 
> - Remove the DaemonPermission as the current Daemon invoker
> implementation doesn't use it.
> 
> - Remove all the fail() methods in DaemonController that doesn't take an
> Exception as an argument, as the new Exception constructors that takes
> an embedded Throwable maked it possible to create generic Exceptions
> that combine another Trhowable with a message.
> 
> That's all the obvious removals IMHO. I'm working on documentation for
> everything that isn't mentioned above.

Please submit me a copy. I am also working on the documentation.

> 
> cheers
> /noa
> 
> 
> *) Without the patch at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23242 you need an
> undocumented init(String[]) method in your Daemon class to make it start
> up at all. The fact that his seems to have been unnoticed for some
> months makes me quite confident that tomcat is the only code using the
> commons-daemon code.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [Daemon] butchering the daemon api

Posted by Bill Barker <wb...@wilshire.com>.
"Daniel Resare" <no...@metamatrix.se> wrote in message
news:1064266457.20173.236.camel@localhost.localdomain...
> As people talk about an 1.0 release about The Jakarta Commons Daemon
> project I have tried to think hard about the Daemon api as it is exposed
> in the public interfaces in org.apache.commons.daemon.
>
> I believe that now is the right time to reform the API since it seems
> like no one(*) is using it right now. (I base this on the fact that in
> addition to implementing the Daemon interface, your daemon currently
> needs to have an undocumented init(String[]) method. This breaks the
> Demo daemons included in the projects).
>
> Since there is little documentation and no implementation explaining
> most of the complexity of the API and no one on this list have answered
> to my queries about it I propse that we remove all but the basic
> functionality exercised by the tomcat Bootstrap class. If anyone wants
> to take repsonsiblity over the extended functionality, they can re-add
> it to the API later on, as that would be an backward compatible change.
>

I would be -1 if it counted for anything ;-).  My personal preference is to
apply the patch in bug #23242.  After closer review then I did on my comment
on the bug, this seems to fix the Daemon regressions.  I really don't want
to lose the use of the Daemon interface just because Tomcat doesn't use it.

> - Remove the DaemonListener. The daemon listener is undocumented and
> unreferenced. If anyone want to listen to daemons control events in the
> future, please feel free to add it document it and write sample code
> that uses it.

Granted, it's not the most useful interface at the moment, but (since it
doesn't hurt anything), I'd rather keep it for future expansion.

>
> - Remove the DaemonPermission as the current Daemon invoker
> implementation doesn't use it.
>

Yeah, well, needs a lot of work.  However (as you've pointed out), it is
harmless as is, and I'd rather have a place to start from.

> - Remove all the fail() methods in DaemonController that doesn't take an
> Exception as an argument, as the new Exception constructors that takes
> an embedded Throwable maked it possible to create generic Exceptions
> that combine another Trhowable with a message.

I can +1 (as before, uselessly from the peanut gallery :) this one.

>
> That's all the obvious removals IMHO. I'm working on documentation for
> everything that isn't mentioned above.
>
> cheers
> /noa
>
>
> *) Without the patch at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23242 you need an
> undocumented init(String[]) method in your Daemon class to make it start
> up at all. The fact that his seems to have been unnoticed for some
> months makes me quite confident that tomcat is the only code using the
> commons-daemon code.




Re: [Daemon] butchering the daemon api

Posted by Bill Barker <wb...@wilshire.com>.
"Daniel Resare" <no...@metamatrix.se> wrote in message
news:1064266457.20173.236.camel@localhost.localdomain...
> As people talk about an 1.0 release about The Jakarta Commons Daemon
> project I have tried to think hard about the Daemon api as it is exposed
> in the public interfaces in org.apache.commons.daemon.
>
> I believe that now is the right time to reform the API since it seems
> like no one(*) is using it right now. (I base this on the fact that in
> addition to implementing the Daemon interface, your daemon currently
> needs to have an undocumented init(String[]) method. This breaks the
> Demo daemons included in the projects).
>
> Since there is little documentation and no implementation explaining
> most of the complexity of the API and no one on this list have answered
> to my queries about it I propse that we remove all but the basic
> functionality exercised by the tomcat Bootstrap class. If anyone wants
> to take repsonsiblity over the extended functionality, they can re-add
> it to the API later on, as that would be an backward compatible change.
>

I would be -1 if it counted for anything ;-).  My personal preference is to
apply the patch in bug #23242.  After closer review then I did on my comment
on the bug, this seems to fix the Daemon regressions.  I really don't want
to lose the use of the Daemon interface just because Tomcat doesn't use it.

> - Remove the DaemonListener. The daemon listener is undocumented and
> unreferenced. If anyone want to listen to daemons control events in the
> future, please feel free to add it document it and write sample code
> that uses it.

Granted, it's not the most useful interface at the moment, but (since it
doesn't hurt anything), I'd rather keep it for future expansion.

>
> - Remove the DaemonPermission as the current Daemon invoker
> implementation doesn't use it.
>

Yeah, well, needs a lot of work.  However (as you've pointed out), it is
harmless as is, and I'd rather have a place to start from.

> - Remove all the fail() methods in DaemonController that doesn't take an
> Exception as an argument, as the new Exception constructors that takes
> an embedded Throwable maked it possible to create generic Exceptions
> that combine another Trhowable with a message.

I can +1 (as before, uselessly from the peanut gallery :) this one.

>
> That's all the obvious removals IMHO. I'm working on documentation for
> everything that isn't mentioned above.
>
> cheers
> /noa
>
>
> *) Without the patch at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23242 you need an
> undocumented init(String[]) method in your Daemon class to make it start
> up at all. The fact that his seems to have been unnoticed for some
> months makes me quite confident that tomcat is the only code using the
> commons-daemon code.




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org