Best way for inter-process communication in Python

Hugo Ferreira bytter at gmail.com
Mon Dec 4 12:48:18 EST 2006


There is another option that I thought while writing this...
I can use the database for data communication. Like having a table
with both in and out parameters. On the client-side, I fill the in
parameters columns. Then I signal the external application which reads
the parameters, and write the output.

Which raises me the following question... How do I signal a python
application under windows? (Is it possible to send something like a
SIGHUP?)

Cheers!

On 12/4/06, Hugo Ferreira <bytter at gmail.com> wrote:
> Hi everyone!
>
> Here's the current scenario: I have a program in Python that computes
> something very fast (<1s), but it takes a considerable amount of time
> to read the startup data (>90s). Since the startup data is pretty
> static, I want this program to be resident and ready in memory all the
> time.
>
> The client-side of this program is a function in PostgreSQL. For the
> sake of simplicity, let's assume it is another program in Python that
> will be asking the resident one for results on-demand. Let's also
> assume that there will be dozens of concurrent requests.
>
> My problem is: what is the fastest, easiest way to accomplish this
> inter-process communication? The data between them will be very small:
> 1Kb max per request. I've thought about SOAP, sockets and named
> pipes... But since I have no experience on any of them using Python, I
> can't decide which way is better...
>
> Just a few considerations: Python version is 2.4. PostgreSQL version
> is 8.2RC1, OS version is Windows Server 2003.
>
> Thanks in advance,
>
> Hugo Ferreira
>
> --
> GPG Fingerprint: B0D7 1249 447D F5BB 22C5  5B9B 078C 2615 504B 7B85
>


-- 
GPG Fingerprint: B0D7 1249 447D F5BB 22C5  5B9B 078C 2615 504B 7B85



More information about the Python-list mailing list