Connecting Tech Pros Worldwide Forums | Help | Site Map

Best way to share a python list of objects

kyle.tk
Guest
 
Posts: n/a
#1: Oct 8 '05
So I have a central list of python objects that I want to be able to
share between different process that are possibly on different
computers on the network. Some of the processes will add objects to
list and another process will be a GUI that will view objects in the
list. I want this all to happen in real-time (e.g once a processes adds
an object to the list the GUI will see it.)

What would be the best way to accomplish this. Some of my ideas:
- An XML file r/w-able by all processes
- Send pickled objects between all processes and each keeps it own list
locally
- A ascii type protocol akin to ftp the hands out all the info to the
processes

Any other ideas? What would work the best


George Sakkis
Guest
 
Posts: n/a
#2: Oct 8 '05

re: Best way to share a python list of objects


"kyle.tk" <kyle.tk@gmail.com> wrote:
[color=blue]
> So I have a central list of python objects that I want to be able to
> share between different process that are possibly on different
> computers on the network. Some of the processes will add objects to
> list and another process will be a GUI that will view objects in the
> list. I want this all to happen in real-time (e.g once a processes adds
> an object to the list the GUI will see it.)
>
> What would be the best way to accomplish this. Some of my ideas:
> - An XML file r/w-able by all processes
> - Send pickled objects between all processes and each keeps it own list
> locally
> - A ascii type protocol akin to ftp the hands out all the info to the
> processes
>
> Any other ideas? What would work the best[/color]

If all the processes are python, I would check Pyro first: http://pyro.sourceforge.net/.

George


Magnus Lycka
Guest
 
Posts: n/a
#3: Oct 11 '05

re: Best way to share a python list of objects


kyle.tk wrote:[color=blue]
> So I have a central list of python objects that I want to be able to
> share between different process that are possibly on different
> computers on the network. Some of the processes will add objects to
> list and another process will be a GUI that will view objects in the
> list. I want this all to happen in real-time (e.g once a processes adds
> an object to the list the GUI will see it.)
>
> What would be the best way to accomplish this. Some of my ideas:
> - An XML file r/w-able by all processes
> - Send pickled objects between all processes and each keeps it own list
> locally
> - A ascii type protocol akin to ftp the hands out all the info to the
> processes
>
> Any other ideas? What would work the best[/color]

Relational database are useful for sharing data in a controlled way.
A better option for arbirary Python objects might be ZODB with ZEO.

http://www.zope.org/Wikis/ZODB/FrontPage
http://www.zope.org/Wikis/ZODB/Front...ide/index.html
Tim Arnold
Guest
 
Posts: n/a
#4: Oct 11 '05

re: Best way to share a python list of objects



"Magnus Lycka" <lycka@carmen.se> wrote in message
news:digjql$j4s$1@wake.carmen.se...[color=blue]
> kyle.tk wrote:[color=green]
>> So I have a central list of python objects that I want to be able to
>> share between different process that are possibly on different
>> computers on the network. Some of the processes will add objects to
>> list and another process will be a GUI that will view objects in the
>> list. I want this all to happen in real-time (e.g once a processes adds
>> an object to the list the GUI will see it.)
>>
>> What would be the best way to accomplish this. Some of my ideas:
>> - An XML file r/w-able by all processes
>> - Send pickled objects between all processes and each keeps it own list
>> locally
>> - A ascii type protocol akin to ftp the hands out all the info to the
>> processes
>>
>> Any other ideas? What would work the best[/color]
>
> Relational database are useful for sharing data in a controlled way.
> A better option for arbirary Python objects might be ZODB with ZEO.
>
> http://www.zope.org/Wikis/ZODB/FrontPage
> http://www.zope.org/Wikis/ZODB/Front...ide/index.html[/color]

Another one to consider is wddx, quite useful if you need to share data
between different languages.

--Tim


Closed Thread