On Fri, 2009-06-12 at 11:30 -0400, Steve Huston wrote:
> > From: Joshua Kramer [mailto:[email protected]] 
> > 
> > > I believe the broker will need additional code to properly react
> to
> > > the Windows Service controls. If you could help with these items
> for
> > 
> > Good point.  Do you think this should be a part of the broker 
> > itself, or 
> > do you think it should be done with a service control 
> > "wrapper"?  This is 
> > what Postgres does - the pg_ctl program acts as a wrapper for the 
> > postmaster and interprets the Windows control signals.
> 
> I think it should be in the broker. There's already a set of files
> that are only included in the Windows build (same deal for Linux et
> al) so it's not a big deal to add it.
> 
> Do you see an advantage in the wrapper approach?

I've done this (a while ago) in a previous life.

There are plusses and minuses to both approaches:

Integrated windows service loop:
* It's more, um, Windows like.
* Fewer processes to run.
* No issue with the SCM/wrapper code thinking that the service state is
one thing when it's not, because of bugs in the wrapper.

Wrapper:
* Less platform specific code.
* Much easier to debug a regular process, rather than a service process
* Windows services run a strange "main" adding to the differences
* This means that the top level code is different when running as a
service or stand-alone.
* There are already some wrappers out there that might be repurposed,
although I don't know about the licensing.

In summary:

Integrating is more windows like and is probably more deployment
focussed.

Wrapping allows for code that is more similar cross platform, and easier
debuggability.

Of course things may have changes in the years since I last did this
(nearly 10 years now), so this assessment could be off a bit.

I'd like to help out with this, but I'm a little busy on other things
now and for the foreseeable future (about 2 weeks in my case!)

Andrew



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to