Pickled objects over the network

R

Rustom Mody

Irmen de Jong wrote
In what way would Pyro be overkill where Yaml (also a module that you need
to install separately) wouldn't be?

Sure they are the same to install and sure pyro can do the job (pyro
is a nice package).

But I got the impression that the questioner wanted to do the
networking stuff himself at a low level (using sockets) and the data
management using some available library -- pickle.

Since pickle has problems
-- does not interface well with networking
-- security issues
-- has an xml option that according to the docs is an order of magnitude slower

I thought I would point out yaml (with safe-load) which sits somewhere
inbetween the xml-pickle and the default pickle.

I should also mention here that I find yaml is much more known and
used in the ruby and perl world than in the python world. This is
unfortunate considering that both ruby and perl have a traditional
syntax (begin end, { } etc ). On the other hand, python and yaml have
similar modern syntactic structures -- structure follows indentation
-- and are therefore well matched to each other.

So in summary the 'competition' is not between yaml and pyro -- pyro
could easily have a pickle-using-yaml option -- but between yaml and
xml.
 
S

Sion Arrowsmith

Rustom Mody said:
Since pickle has problems
-- does not interface well with networking

In what way does pickle not interface well with networking? Other
than, possibly, security issues which you list as a separate problem
with it. I've taken a working XML-RPC system and replaced the XML with
pickle, and had no issues. Other than an order of magnitude
performance gain. (OK, a cow-orker allegedly and unreproducibly found
that cPickle was leaking memory, and as the performance gains weren't
so great with the pure Python implementation, it got shelved and we
stuck with XML-RPC.)
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top