Skip to end of metadata
Go to start of metadata

<p>This IRC Meeting is planned for 18:00 UTC on Wednesday, 28 March 2012.</p>

<ac:macro ac:name="html"><ac:plain-text-body><![CDATA[<iframe src="http://free.timeanddate.com/countdown/i2vpvyb9/cf12/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac000/cpc000/pcfff/tcfff/fs100/szw320/szh135/tatTime%20left%20to%20Event%20in/tac000/tptTime%20since%20Event%20started%20in/tpc000/mac000/mpc000/iso2012-03-28T18:00:00" frameborder="0" width="350" height="64"></iframe>]]></ac:plain-text-body></ac:macro>

<p>Please feel free to add topics, according to the template on the <ac:link><ri:page ri:content-title="IRC Meetings" /><ac:link-body>parent page</ac:link-body></ac:link>.</p>

<h2>RFC - Service Components</h2>

<p>Discuss / vote on the <a href="http://framework.zend.com/wiki/display/ZFDEV2/RFC+-+Service+Components">Service Components RFC</a> to separate out Zend\Service* components.</p>

<ul>
<li><a href="http://zend-framework-community.634137.n4.nabble.com/RFC-Service-Components-Moving-Zend-Service-out-of-the-core-td4490829.html">Mailing List Discussion</a></li>
<li><a href="http://framework.zend.com/wiki/display/ZFDEV2/2012-03-07+Meeting+Log">IRC Meeting Discussion</a></li>
</ul>

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Service Components RFC - Should we discuss this? (Log In to vote.)
Choices Your Vote

Yes

No

]]></ac:plain-text-body></ac:macro>

<h2>Cache: Return value for single get operations on missing items</h2>

<p>Currently get operations return FALSE or throw an ItemNotFoundException (configurable) if you request a missing item. That's confusing, since the cache doesn't know that item and should return no value (NULL). A long time ago there was a small discussion on the mailing list about this and the majority wants to retrieve FALSE. Ben Scholzen (DASPRiD) and Marc Bennewitz (mabe) would like to discuss this again to make it consistent with other components, which usually return NULL in their get*() methods.</p>

<p>Different perspectives:</p>
<ul>
<li>Get missing item -> error -> default is FALSE in PHP</li>
<li>Get missing item -> no value -> NULL</li>
</ul>

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Return value for missing items - Should we discuss this? (Log In to vote.)
Choices Your Vote

Yes

No

]]></ac:plain-text-body></ac:macro>

<h2>Extend the Zend\Crypt features</h2>

<p>The idea is to extend the Zend\Crypt component to offer a cryptographic framework in ZF (proposal of Enrico Zimuel in zf-contributors). Today, if a PHP developer wants to use cryptography in a web project needs to use the Mcrypt extension that is not so easy to manage if you don't have a background in <a href="http://en.wikipedia.org/wiki/Cryptographic_engineering">Cryptography Engineering</a>. I would like to provide a simple API in Zend\Crypt to encrypt/decrypt information using the best practices of cryptography.<br />
The first extensions of Zend\Crypt component will contains:</p>

<ul>
<li>add the encrypt/decrypt methods to Zend\Crypt using the simmetric algorithms of Mcrypt (Blowfish, AES, DES, 3DES, Twofish, etc)</li>
<li>add the encryptThenAuth, AuthThenEncrypt, encryptAndAuth methods to Zend\Crypt, to implement a secure encryption + authentication schema<br />
(more info: <a href="http://www.cryptopp.com/wiki/Authenticated_Encryption">http://www.cryptopp.com/wiki/Authenticated_Encryption</a>)</li>
<li>add the bcrypt algorithm to Zend\Crypt using the crypt('$2a$',...) function of PHP 5.3.0</li>
<li>improve the randomness of Zend\Crypt\Math::rand</li>
</ul>

<p>Moreover, in ZF we have other components that use cryptography: Zend\Filter\Encrypt and Zend\Filter\Decrypt. I think we should refactor these components using the Zend\Crypt.</p>

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

ZendCrypt RFC - Should we discuss this? (Log In to vote.)
Choices Your Vote

Yes

No

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Mar 27, 2012

    <p>There's another possibility for returning values, which may help make "do not expire if we cannot re-create data" scenarios (e.g., cache "expires", but you cannot reach the service, and want to display the cache result anyways). The idea is to return a "CacheResult" object, which could have methods such as:</p>
    <ul>
    <li>isMiss()</li>
    <li>isHit()</li>
    <li>isExpired()</li>
    <li>getData()</li>
    <li>setData($data)</li>
    <li>clear()<br />
    You would then pass the result object to <code>$cache->save()</code>. This pattern allows caching null and/or boolean false values, while simultaneously making it simple to distinguish cache hits and misses.</li>
    </ul>

    1. Mar 27, 2012

      <p>I see the following issues with that:</p>
      <ul>
      <li>isExpired() only works on adapters which can read expired item (capability: static_ttl = false)<br />
      -> Only works on Filesystem, Memory and db like adapters</li>
      <li>For performance reasons this needs to read data of expired items on every get operation or the data object needs extra logic on getData()</li>
      </ul>

      <p>Currently it's also possible to store FALSE/NULL values, but you have to disable the option "ignore_missing_items", than it's throwing an ItemNotFoundException and you can be sure a returned FALSE/NULL value comes from cache.</p>

      <p>Currentls it's also possible to write your behavior with the following steps:</p>
      <ul class="alternate">
      <li>get item from cache</li>
      <li>if it's missing -> re-create data</li>
      <li>if service is down -> get item from cache with option "ttl" = 0</li>
      </ul>

      <p>Another Idea to implement you behavior could be to add an optional callback with if passed re-creates the data and if failed cached data can be returned:</p>
      <ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
      $data = $cache->getItem("myUniqueKey", $options, function () use ($service, $logger) {
      try

      Unknown macro: { // retunred data will be saved automatically with the key used on getItem() return $service->getData(); }

      catch (Exception $e)

      Unknown macro: { $logger->log($e); // throw an exception indicates the cache to return cached data also if expired // the cache re-throw the exception if no data are available throw $e; }

      })
      ]]></ac:plain-text-body></ac:macro>

      1. Mar 28, 2012

        <p>You could have the behavior of the CacheItem change based on the adapter – e.g., you could allow passing callbacks when the CacheItem is created to throw exceptions when a particular operation is unsupported. That said, I also like your callback approach.</p>

        <p>My main point, however, is that there may be situations where boolean false or null values are expected results – in which case, using those types to test whether or not the operation was successful is a bad practice. (That said, I'd likely not store those values in a cache.) I'm simply wondering if there may be another approach we can use.</p>