commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerome lacoste <jerome.laco...@gmail.com>
Subject Re: [exec] Design of commons-exec
Date Thu, 04 Aug 2005 09:38:45 GMT
Thanks a lot to Eric for pointing me to this thread.

As he said, I started a similar project some weeks ago and put some
notes to share on http://www.coffeebreaks.org/blogs/?p=8. I would have
preferred more feedback from the jakarta guys before going further.
Looks like my wishes are coming true :)

In the proposal, I wrote some requirements and design ideas. Maybe the
design ideas are too far from the original Ant classes. But I believe
the requirements should still hold for commons-exec. So I paste them
below:

--------
Requirements & features (proposal)

    * handles the definition of a command line and its running in a
flexible framework
    * minimal external dependencies (0 if possible)
    * run on the oldest SDK possible
    * increased thread safety
    * POJO objects where appropriate
    * extension friendly
    * automatic handling of command execution timeout
    * library should not be in the way of clients. E.g. possibility
for clients to monitor or kill underlying processes
    * test friendly. In particular easy to mock the running of a
command line, e.g. replacing Process inputs/outputs with normal
streams. Maybe provide some mocks as part of the lib or in a jcli-mock
lib.
[...]
Do not forget to look into the new SDK 1.5 ProcessBuilder class.
--------

One of the main issue CruiseControl is having today is in the Process
handling.  In this server side environment, timeouts are not always
practical and we need to give the user more control. So we need a
Process Destroyer like facility, not something automated that is
executed when the VM terminates, but something that gives more control
over the life/death of the processes. Some kind of user triggered
watchdog instead of a timeout triggered one.

The design ideas I tried to describe on the aforementionned page are
focused on trying to solve this issue. They are probably a little bit
too complex. Nevertheless feel free to comment on them.

Answers to your questions:

> * Do you think this fits with what you would find appropriate and useful
> for commons-exec?

Sounds good to me. Except the Process destroyer as pointed by others.

> * Would it be a good starting point (if so I'll create a patch for the
> code I've cleaned up and removed the Ant specifics from)?

a patch or a tarball? Is there some code already somewhere today
outside of Ant's repository?

> * Should I put this on the wiki for further discussions?

If you do so, please send the URL.




I am not sure if I can contribute directly to this library, but you
can be assured that I will use it as soon as there's something usable,
to make sure it fixes out issues in CruiseControl.

Thanks for taking the initiative!

Cheers,

Jerome

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


Mime
View raw message