Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3976534
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:48:57+00:00 2026-05-20T04:48:57+00:00

I have a Python application (with GUI, using PyQt4) that gets spawned by the

  • 0

I have a Python application (with GUI, using PyQt4) that gets spawned by the user in several instances. The application is used to execute some long running tasks (about some hours to a few days), so I’m willing to add an extra “monitoring” application that will do things like:

  • find all the running processes of the other application
  • get the status of the running operations (jobs done, percentage, error messages, …)
  • eventually send some commands to the applications telling them to pause, resume, stop, …

One way that would fit the job is RPyC, the only problem, it seems to work only over TCP sockets, like most of the RPC libraries I found. But this leads to having to open several unneeded sockets listening only on localhost, and having to create some kind of ports allocation mechanism to avoid two processes trying to listen on the same port. And then the monitor needs a list of ports to be written somewhere, or to go and find processes listening on TCP ports and try to figure out whether they are instances of the correct application or ot. Sounds like a mess.

The nicest way of managing the intercommunication I could think of at the moment would be having some unix sockets, let’s say, in ‘/var/run/myapp/myapp-.sock’, and then creating a module that does all the dirty stuff exposing some methods like listMyApps() and getMyApp(pid) returning the first a list of pids, the second an object that could be used for communication with that app.

Now, I’m looking at the best way to accomplish that..
For real, there isn’t anything out there already done to manage RPC over unix sockets? Sounds a bit strange to me, but I wasn’t able to find anything that could fit..

Any suggestions?

NOTE: I don’t want to reverse things (applications are client of a single monitoring server) to avoid problems in case of monitoring application crash, and to letting me free to create other applications that connect to these sockets and make requests.

NOTE: Security is not an issue since all this stuff is running in a private, closed and firewalled network :), plus, requests are done on localhost by trusted users only.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:48:58+00:00Added an answer on May 20, 2026 at 4:48 am

    I guess I found a soultion by using dbus-python. I was able to integrate it with the Qt4 mainloop, although on the website they say only glib was supported (I guess that page is not updated). I just did a qick test and it seems to be working nicely (I just esposed some dummy functions on a bus named com.example.myapp.<pid> and listed instances and connected from an external client).

    Then, I could use the RPyC stuff over TCP only for the communication between a “master” control application and the “manager” application that acts quite like a “switch” between instances on a machine.

    Some ascii-art clarification:

    +-------------------+                    
    | MASTER APP        |                    +--------------------+
    | on my workstation |------ RPyC --------| Server#0 Manager   |
    +-------------------+                    +--------------------+
          |                                      | | |
        RPyC                                     | | '-- dbus ---[INSTANCE #0]
          |                                      | '--- dbus ---[INSTANCE #1]
       +--------------------+                    '---- dbus ---[INSTANCE #2]
       | Server#1 Manager   |
       +--------------------+
          | | |
          | | '-- dbus ---[INSTANCE #0]
          | '--- dbus ---[INSTANCE #1]
          '---- dbus ---[INSTANCE #2]
    

    If anyone is interested, just let me know and I’ll post some code examples/more details too..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a python application that has a glade gui. Using subprocess to execute
I have a python application that relies on a file that is downloaded by
Long story short, I have a substantial Python application that, among other things, does
We have a Linux application that makes use of OpenSSL's Python bindings and I
I want to run javascript/Python/Ruby inside my application. I have an application that creates
I've an python GUI application, I use pyQt4. I build binary with bbfreeze (before
I am writing an application in Python using Tkinter to manage my GUI. There
I have a Python application in a strange state. I don't want to do
I'm thinking how to arrange a deployed python application which will have a Executable
I'm writing a GUI application that regularly retrieves data through a web connection. Since

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.