<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 20:51:59 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michael Nitschinger: Benchmarking Cache Transcoders in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19117</guid>
      <link>http://www.phpdeveloper.org/news/19117</link>
      <description><![CDATA[<p>
<i>Michael Nitschinger</i> has written up a new post comparing a few different methods for serializing or translating objects to <a href="http://nitschinger.at/Benchmarking-Cache-Transcoders-in-PHP">store them in a cache</a>. In it, he compares the PHP serializer, the <a href="http://pecl.php.net/package/igbinary">igbinary</a> extension and translation to JSON.
</p>
<blockquote>
Storing PHP objects (or simpler data types like arrays) in caches always requires some kind of transformation. You need a way of encoding/decoding data so that it can be stored and loaded properly. In most languages, this process is known as object <a href="http://en.wikipedia.org/wiki/Serialization">serialization</a>. PHP provides a mechanism for this out of the box, but in this article we'll also look at <a href="http://pecl.php.net/package/igbinary">igbinary</a> as a drop-in replacement for the default serializer. We also compare the results to object transcoding based on <a href="http://json.org/">JSON</a>, which is not really an object serialization mechanism but commonly used as a data chache structure which has its own benefits and drawbacks.
</blockquote>
<p>
He goes through each of the three technologies and includes a snippet of code showing how they'd work in object translation. He also talks about things like the size of the result and the performance of each when the results are looped over. Based on the results of some of his "microbenchmarking" of each of the methods, <a href="http://pecl.php.net/package/igbinary">igbinary</a> came out on top, even faster than PHP's own <a href="http://php.net/serialize">serialize</a>/<a href="http://php.net/unserialize">unserialize</a>.
</p>]]></description>
      <pubDate>Thu, 31 Jan 2013 11:31:01 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ilia Alshanetsky's Blog: Igbinary, The great serializer]]></title>
      <guid>http://www.phpdeveloper.org/news/13571</guid>
      <link>http://www.phpdeveloper.org/news/13571</link>
      <description><![CDATA[<p>
In looking for a better way to handle serialized data (than the usual <a href="http://php.net/serialize">serialize</a>) <i>Ilia Alshanetsky</i> discovered an extension called <a href="http://opensource.dynamoid.com/">Igbinary</a>:
</p>
<blockquote>
As I was reading docs on <a href="http://zmievski.org/">Andrei</a>'s new memcache extension (<a href="http://pecl.php.net/package/memcached">memcached</a>) I came across a binary serialization extension called Igbinary written by Sulake Dynamoid Oy. This extension promised much more optimal serialization routines by using binary, rather then a clear text format. Sounded, good so I decided to run a few benchmarks on it.
</blockquote>
<p>
He uses several different sizes of files to run his tests and found that, while it is just a bit slower than the normal serialization, the compression rate that's about fifty times smaller than the usual. The extension also offers a "compact_strings" parameter that allows for even more compression of just string data.
</p>
<blockquote>
As you can see the serialization speed is pretty amazing, once your serialized data set is in excess of 100bytes, you can expect nearly 2x improvement with a ~30% data set reduction with igbinary. I think we got a winner!
</blockquote>]]></description>
      <pubDate>Fri, 20 Nov 2009 10:38:16 -0600</pubDate>
    </item>
  </channel>
</rss>
