Re: init: API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2005-11-16 at 12:04 -0500, Dimi Paun wrote:
> Folks,
> 
> Since we are discussing a new init replacement, I think
> we should consider a good API for it too, so that it services
> can be controlled programmatically. At the very least, we
> need to be able to:
>   * start/stop/reload/restart a service
>   * query its status
>   * wait for a service to start/stop
>   * a way for services to interact with the administrators
>     (for example to ask for passphrases, etc.)
>   * a way to signal problems (probably D-BUS bases)
> 
> I know this is blasphemy, but how about we start (at least
> for inspiration) with the Services API from Win32:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/service_functions.asp
> 
> For more info about Win32 services:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/services.asp
> 
> At the very least looking at other APIs will tell us:
>   * what we need to cover
>   * what we should avoid
> 
> What other APIs are out there? Does Sun have one?
> 
> -- 
> Dimi Paun <dimi@xxxxxxxxxxx>
> Lattica, Inc.
> 

Just to add my 2c worth.
I wrote a large number of WinNT/2K services and from my experience, it's
the last system we'd want to duplicate.
Here's why:
A. ServiceManager needs a separate Main and Signal handling code.
(Forcing us to modify each and every service we want to run.)
B. If you decided not to modify the service itself, and use the generic
service system (AKA svchost.exe), you lose the ability to monitor the
health of the services. (Or heck, even know what service runs behind
srvhost.exe)
C. Non-integrated event-logging mechanism. (In Windows you're forced to
use the event-log; it doesn't capture the stdio/stderr output, again
forcing you to add code to the service itself.)
D. No built-in support for automated auto-service-restart.
E. *Very* limited service dependency management. 

And last, more important then all.
F. All ServiceManager interaction must be done using the service
code; /Very/ limited shell support. (net start/stop service_name).

In short, I'd stay clear of Windows ServiceManager as a reference.
Gilboa

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux