<?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>Thu, 24 May 2012 15:11:39 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[IBM developerWorks: Store datasets directly in shared memory with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17426</guid>
      <link>http://www.phpdeveloper.org/news/17426</link>
      <description><![CDATA[<p>
On the IBM developerWorks site today there's a new tutorial showing you how to <a href="http://www.ibm.com/developerworks/opensource/library/os-php-shared-memory/index.html">store shared data</a> directly to a shared memory space of your PHP application.
</p>
<blockquote>
Once created, and given proper permissions, other processes in the same machine can manipulate those segments by: read, write, and delete. This means that an application written in C can share information with an application written in other languages, such as Java or PHP. They can all share information, as long as they can access and understand that information. [...] This article's proposal is simple, learn how to create and manipulate shared memory segments with PHP and use them to store datasets that other applications can use.
</blockquote>
<p>
Your PHP installation will need to have been compiled with "enable-shmop" to work with the code in this tutorial. Their examples show how to use the <a href="http://php.net/shmop_open">shmop_open</a>, <a href="http://php.net/shmop_write">shmop_write</a> and other related functions to read, write, remove and close segments in the shared memory space. They also include an example of using the <a href="https://github.com/klaussilveira/SimpleSHM">SimpleSHM</a> library to make it easier to interact with the shared memory space as a standard storage location.
</p>]]></description>
      <pubDate>Fri, 20 Jan 2012 11:29:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schl&uuml;ter's Blog: High Performance PHP Session Storage on Scale]]></title>
      <guid>http://www.phpdeveloper.org/news/17147</guid>
      <link>http://www.phpdeveloper.org/news/17147</link>
      <description><![CDATA[<p>
In <a href="http://schlueters.de/blog/archives/164-High-Performance-PHP-Session-Storage-on-Scale.html">this new post</a> to his blog, <i>Johannes Schl&uuml;ter</i> looks at a high-performance solution to the usual storing PHP session information via a memcache frontend with a MySQL Cluster backend.
</p>
<blockquote>
Unfortunately even such a system [using MySQL and InnoDB tables] has limits and unfortunately replication is no good solution here to scale further as we will always need a master for writing the updated session data. By using replication we can take some load from it and we can configure a slave which can be promoted to master to keep session alive if the primary master machine fails but at some point in time we need another solution ... but, happy news, again: One doesn't have to look far as MySQL cluster will be happy to help. MySQL Cluster "is a high-availability, high-redundancy version of MySQL adapted for the distributed computing environment," as the <a href="http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster.html">MySQL documentation states</a>. 
</blockquote>
<p>
He describes the setup (after pointing to <a href="http://www.clusterdb.com/mysql-cluster/scalabale-persistent-ha-nosql-memcache-storage-using-mysql-cluster/">this post</a> about installing MySQL Cluster for memcache) and includes some sample code/SQL/ini settings you'll need to use to get PHP's <a href="http://us.php.net/manual/en/class.memcached.php">memcached</a> functionality to cooperate with it.
</p>
]]></description>
      <pubDate>Fri, 18 Nov 2011 10:13:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Andrew Martin's Blog: Serving PHP session files from a RAM based disk (tmpfs) for AWS Micro Instance]]></title>
      <guid>http://www.phpdeveloper.org/news/16959</guid>
      <link>http://www.phpdeveloper.org/news/16959</link>
      <description><![CDATA[<p>
<i>Andrew Martin</i> has a new post to his blog looking at a technique that could be used to help minimize some of the performance issues you could see on <a href="http://aws.amazon.com">AWS micro instances</a> dealing with PHP session handling. His alternative is <a href="http://www.binarysludge.com/2011/08/31/serving-php-session-files-from-a-ram-based-disk-tmpfs-for-aws-micro-instances/">serving them from a RAM-based disk</a> instead.
</p>
<blockquote>
It's rare to find a web server with slow disk I/O performance, but Amazon's EC2 micro-instances are one such example. Their EBS disk subsystem access is rated "low", and this can have a detrimental effect on HTTP throughput. [...] This leaves sessions, which can be written to a <a href="http://www.binarysludge.com/2011/01/13/redundant-and-fault-tolerant-php-session-storage/">redundant and fault tolerant storage system</a>. [...] In order to speed up the disk access, a RAM-based disk can be mounted over the session directory. This has the disadvantage of being volatile - the data is lost in case of a server reboot, or the mount point being unmounted. However if tolerable, storing sessions in RAM insulates the application from poor filesystem performance.
</blockquote>
<p>
He mentions the two types of kernels that can be used, ramfs and tmpfs, and the specifics of using a tmpfs filesystem to implement the technique (complete with command line calls to make it happen). 
</p>]]></description>
      <pubDate>Thu, 06 Oct 2011 11:42:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Project: Google Storage Plugin for CakePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16592</guid>
      <link>http://www.phpdeveloper.org/news/16592</link>
      <description><![CDATA[<p>
<i>Jonathan Bradley</i> has submitted a handy new helper for the CakePHP users out there that can help to work with Google's Storage in a drop-in plugin - the <a href="https://github.com/jonbradley/google_storage">Simple Google Storage Plugin</a> for CakePHP.
</p>
<blockquote>
Ever noticed how there is no decent support for CakePHP to utilize Google Storage? Well the wait is over, after realizing that Amazon S3 was just way to unreliable and bloated with spammers and usuage hogs. You can now add Google Storage support to your CakePHP application.
</blockquote>
<p>
Obviously you'll need to be set up with <a href="http://code.google.com/apis/storage/">Google Storage</a> before using it, but the tool makes it as simple as calling publish() to push the data out, return all of the bucket information for your account and pull out information about individual objects. There's also a method that lets you make new buckets on the fly to make categorization simpler.
</p>
<p>
The heart of the code lies in the <a href="https://github.com/jonbradley/google_storage/blob/master/vendors/Storage.php">Storage class</a>, so if you want to see how it's done, check that first. Other frameworks have their own interfaces with the Google services too, like the Zend Framework's <a href="http://framework.zend.com/download/gdata">Zend_GData</a> component.
</p>]]></description>
      <pubDate>Thu, 14 Jul 2011 11:03:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: How to Use the Storage Emulator with the Windows Azure SDK for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16221</guid>
      <link>http://www.phpdeveloper.org/news/16221</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Brian Swan</i> shows you how to use the <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/04/19/how-to-use-the-storage-emulator-with-the-windows-azure-sdk-for-php.aspx">Storage Emulator for Azure</a> with PHP via their provided SDK. It's a quick post but it has a helpful code snippet if you've been struggling with getting it set up.
</p>
<blockquote>
This is a short post to address this question: How do I use the local <a href="http://msdn.microsoft.com/en-us/library/gg432983.aspx">Storage Emulator</a> (formerly known as Development Storage) when using the <a href="http://phpazure.codeplex.com/">Windows Azure SDK for PHP</a>? The <a href="http://azurephptools.codeplex.com/releases/view/62345">Windows Azure Command Line Tools for PHP</a> provide an option for running an application locally in the <a href="http://msdn.microsoft.com/en-us/library/gg432968.aspx">Compute Emulator</a>, but I didn't see an option for using the local Storage Emulator.  As it turns out, the answer is very simple, although somewhat difficult to find.
</blockquote>
<p>
The trick is to omit the constructor parameters when creating a new table/blob/client to get it to create things locally instead of on your Azure instance. He also includes a set of links that can help fill in some of the gaps in the whole Windows Azure deployment process.
</p>]]></description>
      <pubDate>Wed, 20 Apr 2011 08:43:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Updating PHP Settings in Windows Azure]]></title>
      <guid>http://www.phpdeveloper.org/news/16178</guid>
      <link>http://www.phpdeveloper.org/news/16178</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has a new post today looking at how you can <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/04/11/updating-php-settings-in-windows-azure.aspx">update some PHP settings</a> in your  Windows Azure instance - an alternative to redeploying your every time your php.ini file might need an update.
</p>
<blockquote>
I came across this question on Twitter last week: "How can I turn display_errors on for an application that is running in Windows Azure?" I have to admit that I was stumped. The only thing I could think of was to re-deploy the application with an updated php.ini file. But, I happened to mention this question to <a href="http://twitter.com/#!/benlobaugh">Ben Lobaugh</a> who suggested a very simple idea: Store your PHP settings in some durable store external to your application as key-value pairs, then loop through the settings and update them with the <a href="http://us2.php.net/ini_set">ini_set</a> function when a page loads. 
</blockquote>
<p>
He puts a big disclaimer on his suggestion, noting that it's "a hack and only a hack" and can be useful for someone still learning how to work with Azure and deployment. He shows how to use a Table storage to save the values and make them easier for the application to grab at runtime. Using the tools from <a href="http://phpazure.codeplex.com/">their SDK</a>, fetching and setting those values is a simple process. An idea like this, while convenient, could potentially cause performance issues down the line, do be careful with this recommendation (and be sure to load test).
</p>]]></description>
      <pubDate>Tue, 12 Apr 2011 08:46:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[BinarySludge.com: Redundant and Fault Tolerant PHP Session Storage]]></title>
      <guid>http://www.phpdeveloper.org/news/15742</guid>
      <link>http://www.phpdeveloper.org/news/15742</link>
      <description><![CDATA[<p>
New on BinarySludge.com today there's a tutorial looking at <a href="http://www.binarysludge.com/2011/01/13/redundant-and-fault-tolerant-php-session-storage/">redundant and fault tolerant session storage</a> via a few different technologies that can store session data with a custom <a href="http://php.net/manual/en/function.session-set-save-handler.php">session handler</a>.
</p>
<blockquote>
If a PHP application has deeply embedded usage of the $_SESSION superglobal, removing state is difficult. Instead removing the dependency between a user's session data and the single server it's stored on achieves the same fault tolerance. 
</blockquote>
<p>
They focus on a REST-ful approach to session handling, that it should be "kept entirely on the client" so there's no issue if something happens to the primary session data source. They point out that, while the technologies that can be used to replace it are similar, there's still some issues around using things like <a href="http://pecl.php.net/package-info.php?package=memcache">memsached</a>, <a href="http://sharedance.pureftpd.org/project/sharedance">Sharedance</a>, Hazelcast or MySQL to store session details.
</p>]]></description>
      <pubDate>Fri, 14 Jan 2011 10:05:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schluter's Blog: HashTables]]></title>
      <guid>http://www.phpdeveloper.org/news/15000</guid>
      <link>http://www.phpdeveloper.org/news/15000</link>
      <description><![CDATA[<p>
<i>Johannes Schluter</i> has <a href="http://schlueters.de/blog/archives/142-HashTables.html">a new post</a> to his blog on another PHP internals related topic - hashtables.
</p>
<blockquote>
While preparing my "<a href="http://phpconference.nl/schedule/talks#phphood">PHP Under The Hood</a>" talk for the Dutch PHP Conference there was a question on IRC about <a href="http://php.net/extension_loaded">extension_loaded</a>() being faster than <a href="http://php.net/function_exists">function_exists</a>(), which might be strange as both of them are simple hash lookups and a hash lookup is said to be O(1). I started to write some slides for it but figured out that I won't have the time to go through it during that presentation, so I'm doing this now.
</blockquote>
<p>
He talks about array storage (a "real" array), numeric and string-based keys, the internals of how each is stored and how the differences make the one function faster than the other (hint: it's all <a href="http://schlueters.de/~johannes/php/collisions.txt">about collisions</a>).
</p>]]></description>
      <pubDate>Mon, 23 Aug 2010 08:58:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Accessing Windows Azure Blob Storage from PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14772</guid>
      <link>http://www.phpdeveloper.org/news/14772</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has <a href="http://blogs.msdn.com/b/brian_swan/archive/2010/07/08/accessing-windows-azure-blob-storage-from-php.aspx">posted a new tutorial</a> to his blog showing you how to connect your PHP application with the Azure service and use the blob storage it offers.
</p>
<blockquote>
In this post I will do something similar [to <a href="http://blogs.msdn.com/b/brian_swan/archive/2010/06/24/accessing-windows-azure-table-storage-from-php.aspx">this previous post</a>] for accessing Windows Azure Blob Storage from PHP. This won't be a deep-dive into Windows Azure Blob Storage, but it will be a "how to get started with the Microsoft_WindowsAzure_Storage_Blob  class (which is part of the <a href="http://phpazure.codeplex.com/">Windows Azure SDK for PHP</a>)"-type post.
</blockquote>
<p>
He talks about how these blob containers are stored on the Azure side and what kind of access controls they come with. <a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-33-78-metablogapi/6646.image_5F00_46C631B2.png">This graph</a> might help sort it all out</a>. From there he shows you how to use the <a href="http://phpazure.codeplex.com/">PHP SDK</a> to connect to the service, make a new container (with an ACL) and doing all of the usual operations with a blob - uploading, downloading, streaming, deleting and listing the blobs currently available.
</p>]]></description>
      <pubDate>Fri, 09 Jul 2010 12:48:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Accessing Windows Azure Table Storage from PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14703</guid>
      <link>http://www.phpdeveloper.org/news/14703</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> (of Microsoft) has <a href="http://blogs.msdn.com/b/brian_swan/archive/2010/06/24/accessing-windows-azure-table-storage-from-php.aspx">a new post to his blog</a> today looking at using the Windows Azure Table Storage from inside of your PHP application.
</p>
<blockquote>
An overly-simplified answer: Windows Azure Table Storage is structured storage in the cloud provided by the Windows Azure platform. It allows you to create any number of tables, which can each contain any number of entities. Each entity can in turn contain any number of properties. <a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-33-78-metablogapi/7206.image_5F00_652B2BF1.png">A picture</a> is worth a thousand words here.
</blockquote>
<p>
Think of it as almost a Microsoft-created version of a NoSQL database engine. He shows you how to get started by <a href="http://www.microsoft.com/windowsazure/offers/">making an Azure account</a> and setting up a new project for you to work from. Then, using the <a href="http://phpazure.codeplex.com/">Azure SDK</a>, he shows how to easily make a connection and do all of the usual CRUD (create, read, update, delete) operations on this new project.
</p>]]></description>
      <pubDate>Fri, 25 Jun 2010 10:11:11 -0500</pubDate>
    </item>
  </channel>
</rss>

