EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: sending pickled python objects of epics channel access
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Mon, 15 May 2017 17:24:48 -0500
Hi Tim,

On 05/15/2017 05:00 PM, Madden, Timothy J. wrote:
> This is probably a bad idea... But if I were to take a python object,
> call pickle.dumps() to convert it into a string, I
> could then caput it to a waveform record. Then some other py client
> could caget, then call pickle.loads() from the
> waveform record. then we get the object back.  So we are sending python
> objects over epics CA.
> 
> Has anyone tried this? Seems straightforward. Just how bad an idea is this?

I don't see it as a particularly terrible idea. I wonder if the DØ guys
at Fermilab ever used to do something like this (I do remember Fritz
Bartlett talking about pickling, but the tech-talk archives don't return
anything related).

The obvious limitation of pickling is that you are limiting other users
to writing their code in Python (or in some other language that has a
compatible de/serializing library — Perl's CPAN has such a module called
Python::Serialise::Pickle but it only had one release, in 2003), but
that might not be a problem for some projects. If you were to use a more
generic format such as JSON or YAML you might make life easier for
others, but if you're only expecting this data to ever pass between your
2 clients that shouldn't be a big issue.

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

Replies:
Re: sending pickled python objects of epics channel access Kasemir, Kay
References:
sending pickled python objects of epics channel access Madden, Timothy J.

Navigate by Date:
Prev: Re: sending pickled python objects of epics channel access Matt Newville
Next: Re: sending pickled python objects of epics channel access Hartman, Steven M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: sending pickled python objects of epics channel access Matt Newville
Next: Re: sending pickled python objects of epics channel access Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024