Ipc mechanisms and designs.

K

king kikapu

Hi,

inspired of the topic "The Future of Python Threading", i started to
realize that the only way to utilize the power of multiple cores using
Python, is spawn processes and "communicate" with them.

If we have the scenario:

1. Windows (mainly) development
2. Processes are running in the same machine
3. We just want to "pass" info from one process to another. Info may
be simple data types or user defined Python objects.

what is the best solution (besides sockets) that someone can implement
so to have 2 actually processes that interchanged data between them ?
I looked at Pyro and it looks really good but i wanted to experiment
with a simpler solution.
 
A

Alex Martelli

king kikapu said:
Hi,

inspired of the topic "The Future of Python Threading", i started to
realize that the only way to utilize the power of multiple cores using
Python, is spawn processes and "communicate" with them.

If we have the scenario:

1. Windows (mainly) development
2. Processes are running in the same machine
3. We just want to "pass" info from one process to another. Info may
be simple data types or user defined Python objects.

what is the best solution (besides sockets) that someone can implement
so to have 2 actually processes that interchanged data between them ?
I looked at Pyro and it looks really good but i wanted to experiment
with a simpler solution.

Check out <http://www.lindaspaces.com/products/NWS_overview.html>


Alex
 
N

Nikita the Spider

king kikapu said:
Hi,

inspired of the topic "The Future of Python Threading", i started to
realize that the only way to utilize the power of multiple cores using
Python, is spawn processes and "communicate" with them.

If we have the scenario:

1. Windows (mainly) development
2. Processes are running in the same machine
3. We just want to "pass" info from one process to another. Info may
be simple data types or user defined Python objects.

what is the best solution (besides sockets) that someone can implement
so to have 2 actually processes that interchanged data between them ?
I looked at Pyro and it looks really good but i wanted to experiment
with a simpler solution.

Hi King Kikapu
There's a shared memory module for Python, but it is *nix only, I'm
afraid. I realize you said "mainly Windows" but this module seems to do
what you want so maybe you can work out a creative solution.

http://NikitaTheSpider.com/python/shm/

Good luck with whatever you choose
 
K

king kikapu

Hi King Kikapu
There's a shared memory module for Python, but it is *nix only, I'm
afraid. I realize you said "mainly Windows" but this module seems to do
what you want so maybe you can work out a creative solution.

http://NikitaTheSpider.com/python/shm/


Yes, i am currently developing mainly on windows but a cross-platform
solution would surely interests me. I will check it out this!

@Alex: Thanks, it looks very-very interesting...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top