Re: "Rehabilitating Pickle" a talk at PyCon UK 2018
Jim Fulton <[email protected]> Sat, 26 Jan 2019 11:11:26 -0700
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <CAPDm-FjMAL9o7GXwrw_BzD2gqy1r-C0K-P5RciX+wH1Opq55vA@mail.gmail.com> |
--000000000000e26cac0580605fdf Content-Type: text/plain; charset="UTF-8" On Wed, Jan 16, 2019 at 3:33 AM Christopher Lozinski < [email protected]> wrote: > I found this talk quite interesting. > I finally found some time to watch this. Me too. > > 9 minutes <https://twitter.com/PythonLinks/status/1085482554000580608>Pickle > is a compact serialization protocol for Python objects. Great for > communication between #distributed > <https://twitter.com/hashtag/distributed?src=hash> #Python > <https://twitter.com/hashtag/Python?src=hash> programs, but it is not > safe. > > What can be done? > > https://pythonlinks.info/rehabilitating-pickle > The original and I would say dominant use case for pickle, as its name implies, is for saving things. It wouldn't be among my first choices for implementing network protocols (OK, anymore, but give me a break, I implemented ZEO many years ago). I take issue with the assertion that it shouldn't be used for long term storage. (Leaving aside the Py2/3 fiasco.) There is coupling between stored data and application code, but this is true of any database. Applications that use databases are dependent on the database schema and will break if the database schema changes. The danger is a bit greater with anything like ZODB (or Mongo or ..) that doesn't enforce schemas on servers, but changes in schemas over time are an issue regardless of the serialization format or database technology used. (BTW, IMO, there are no schemaless databases. There's always a schema for application data even if it's only expressed in application code.) Jim -- Jim Fulton http://jimfulton.info -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. --000000000000e26cac0580605fdf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jan 16, 2019 at 3:33 AM Chris= topher Lozinski <<a href=3D"mailto:[email protected]">loz= [email protected]</a>> wrote:<br></div><blockquote class=3D"= gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20= 4,204,204);padding-left:1ex"><div style=3D"overflow-wrap: break-word;"><div= >I found this talk quite interesting. =C2=A0</div></div></blockquote><div><= br></div><div>I finally found some time to watch this. Me too.</div><div>= =C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style=3D= "overflow-wrap: break-word;"><div><br></div><div><div class=3D"gmail-m_-224= 0109269721579512stream-item-header" style=3D"display:flex;color:rgb(20,23,2= 6);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-s= ize:14px;font-variant-ligatures:normal;background-color:rgb(255,255,255)"><= small class=3D"gmail-m_-2240109269721579512time" style=3D"font-size:14px;co= lor:rgb(101,119,134);margin-right:5px;white-space:nowrap"><span class=3D"gm= ail-m_-2240109269721579512u-hiddenVisually" style=3D"background-color:trans= parent;color:rgb(101,119,134);text-decoration:none;border:0px;font-size:1px= ;height:1px;overflow:hidden;padding:0px;width:1px"><a href=3D"https://twitt= er.com/PythonLinks/status/1085482554000580608" class=3D"gmail-m_-2240109269= 721579512js-nav gmail-m_-2240109269721579512tweet-timestamp gmail-m_-224010= 9269721579512js-permalink gmail-m_-2240109269721579512js-tooltip" title=3D"= 2:23 AM - 16 Jan 2019" style=3D"background-color:transparent;color:rgb(101,= 119,134);text-decoration:none" target=3D"_blank">9 minutes </a></span><span= style=3D"white-space:pre-wrap;color:rgb(20,23,26)">Pickle is a compact ser= ialization protocol for Python objects. Great for communication between </s= pan><a href=3D"https://twitter.com/hashtag/distributed?src=3Dhash" class=3D= "gmail-m_-2240109269721579512twitter-hashtag gmail-m_-2240109269721579512js= -nav gmail-m_-2240109269721579512pretty-link" dir=3D"ltr" target=3D"_blank"= style=3D"white-space:pre-wrap;background:transparent;color:rgb(27,149,224)= ;text-decoration-line:none">#distributed</a><span style=3D"white-space:pre-= wrap;color:rgb(20,23,26)"> </span><a href=3D"https://twitter.com/hashtag/Py= thon?src=3Dhash" class=3D"gmail-m_-2240109269721579512twitter-hashtag gmail= -m_-2240109269721579512js-nav gmail-m_-2240109269721579512pretty-link" dir= =3D"ltr" target=3D"_blank" style=3D"white-space:pre-wrap;background:transpa= rent;color:rgb(27,149,224);text-decoration-line:none">#Python</a><span styl= e=3D"white-space:pre-wrap;color:rgb(20,23,26)"> programs, but it is not saf= e. </span></small></div><div class=3D"gmail-m_-2240109269721579512js-tweet-= text-container" style=3D"color:rgb(20,23,26);font-family:"Helvetica Ne= ue",Helvetica,Arial,sans-serif;font-size:14px;font-variant-ligatures:n= ormal;background-color:rgb(255,255,255)"><p class=3D"gmail-m_-2240109269721= 579512TweetTextSize gmail-m_-2240109269721579512tweet-text gmail-m_-2240109= 269721579512js-tweet-text" lang=3D"en" style=3D"margin:0px 0px 8px;line-hei= ght:20px;white-space:pre-wrap">What can be done?</p></div></div><div><br></= div><div><a href=3D"https://pythonlinks.info/rehabilitating-pickle" target= =3D"_blank">https://pythonlinks.info/rehabilitating-pickle</a></div></div><= /blockquote><div><br></div><div>The original and I would say dominant use c= ase for pickle, as its name implies, is for saving things.</div><div><br></= div><div>It wouldn't be among my first choices for implementing network= protocols (OK, anymore, but give me a break, I implemented ZEO many years = ago).</div><div><br></div><div>I take issue with the assertion that it shou= ldn't be used for long term storage. (Leaving aside the Py2/3 fiasco.)<= /div><div><br></div><div>There is coupling between stored data and applicat= ion code, but this is true of any database.=C2=A0 Applications that use dat= abases are dependent on the database schema and will break if the database = schema changes.=C2=A0 The danger is a bit greater with anything like ZODB (= or Mongo or ..) that doesn't enforce schemas on servers, but changes in= schemas over time are an issue regardless of the serialization format or d= atabase technology used.</div><div><br></div><div>(BTW, IMO, there are no s= chemaless databases.=C2=A0 There's always a schema for application data= even if it's only expressed in application code.)</div><div><br></div>= <div>Jim</div></div>-- <br><div dir=3D"ltr" class=3D"gmail_signature">Jim F= ulton<br><a href=3D"http://jimfulton.info" target=3D"_blank">http://jimfult= on.info</a><br></div></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;zodb" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">zodb+unsubscri= [email protected]</a>.<br /> For more options, visit <a href=3D"https://groups.google.com/d/optout">http= s://groups.google.com/d/optout</a>.<br /> --000000000000e26cac0580605fdf--