views:

38

answers:

8

What would you call a class that wraps some external process Worker (starts and stops it, reads stdin, stdout, etc.)?

  • WorkerFacade?
  • WorkerGateway?
  • WorkerWrapper?
A: 

WorkerWatchdog :)

Vitaliy Liptchinsky
A watchdog is usually something that ensures that some resource is alive, it doesn't sound like exactly the thing described here.
Freed
+1  A: 

A WorkerProxy? Ok, need 15 chars....

o.k.w
I like the Proxy or Facade the most. But it involves the design patterns, which do not fit too well into this situation..?
ctinnist
A: 

WorkerRunner...

Chris
+2  A: 

Manager, since it just controls workers

or Executive, if it has stock options!

Steven A. Lowe
A: 

The name I would choose depends on the problem domain. For example MyProcessWatcher might be OK in some contexts, while ApacheProcessWatcher might be appropriate in others.

Mike Chess
A: 

I'd say WorkerAdapter, since it translates between your code and the external process.

Lennaert
A: 

I think WorkerExecutor has a certain ring to it.

MarkPowell
A: 

That the external process is a "worker" is detail of your implementation, so I'd be tempted to call the class "Process" and call the instance "Worker".

Kaz Dragon