<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 10/18/2010 09:10 PM, Elizabeth Liao wrote:
<blockquote
 cite="mid:F83B0A28F6E1D043B7DA81F5466C564D0F4CB7@vmexchange01.seegrid.local"
 type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
  <div
 style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt;">[...]<br>
What would like to do is to somehow identify what twisted
services/plugins are running because different things happen depending
on what plugin is currently in use.&nbsp; We are running on Linux wanted to
see if there was an easy way of doing that using the twisted
libraries.&nbsp; I suppose one solution is to get a list of processes
running and parse that but I would rather not do that.<br>
  <br>
  </div>
</blockquote>
Hi Elizabeth,<br>
I don't think (and meanwhile know, because Glyph already answered)
there's a ready-made solution for your requirements (inside twisted, at
least), but it should be relatively straightforward to implement one
using twisted. If I understand you correctly, you need an interface to
query which plugins/services (aka t.a.s.Services) in which twisted
processes are in which state on a given machine, or even all machines
involved in your setup. Since you can have several machines running
several twisted processes, where each process can have several plugins
installed each in different states, and each plugin can offer several
Services, which also can be in different states, (and even install/run
other plugins and services ) twisted itself per default obviously
cannot provide an interface to query all this information, if only
because a given process just knows about itself. <br>
<br>
If I wanted to implement this, I'd start with a central service, that
offers an interface for (twisted) apps/clients/servers to register
themselves on startup. All "participating" plugins and services would
of course have to know about that service, but depending on your
requirements it might suffice to use a common subclass of&nbsp;
twisted.application.service.Service, that takes care of performing the
necessary steps to inform your central state-monitoring service about
their existence and state.<br>
<br>
Johann<br>
<br>
<br>
</body>
</html>