Python Network Programming
by Abhishek Ratan, Eric Chou, Pradeeban Kathiravelu, Dr. M. O. Faruque Sarker
How it works...
This recipe relies on running the Supervisor daemon (configured with rpcinterface) in the background. Supervisor launches another XML-RPC server, as follows: 17_2_multithreaded_multicall_xmlrpc_server.py.
The client code has a query_supervisr() method, which takes an argument for the Supervisor socket. In this method, an instance of SupervisorTransport is created with the Unix socket path. Then, an XML-RPC server proxy is created by instantiating the ServerProxy() class of xmlrpclib by passing the server address and previously created transport.
The XML-RPC server proxy then calls the Supervisor's getAllProcessInfo() method, which prints the process information of the child process. This process includes pid, statename,
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access