<?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>Sat, 25 May 2013 13:16:24 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Derick Rethans: Read Preferences wth the MongoDB PHP driver]]></title>
      <guid>http://www.phpdeveloper.org/news/18927</guid>
      <link>http://www.phpdeveloper.org/news/18927</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has <a href="http://derickrethans.nl/readpreferences.html">a new post</a> to his site detailing some of the "read" preferences that you can customize in the latest versions of the MongoClient functionality in the MongoDB PHP extension for replica sets and sharing setups.
</p>
<blockquote>
Read Preferences are a new Replica Set and Sharding feature implemented by most <a href="http://mongodb.org/">MongoDB</a> drivers that are supported by <a href="http://10gen.com/">10gen</a>. This functionality requires MongoDB 2.2. In short, Read Preferences allow you to configure from which nodes you prefer the driver reads data from. In a Replica Set environment it is the driver that does the selection of the preferred node, and in a Sharded environment it is the mongos process that routes queries according to the defined Read Preferences.
</blockquote>
<p>
He starts with a look at the read preference types (like "primary", "secondary" and "nearest") how the connection manager works to handle each type. He includes some code samples showing how to configure your MongoClient connections to use these various types of preferences. He also introduces the concept of "tags" for the replica set - aliases to make them a bit easier to identify when making a connection and how to define them in the connection string.
</p>]]></description>
      <pubDate>Thu, 20 Dec 2012 13:41:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans: Mongo is dead, long live MongoClient]]></title>
      <guid>http://www.phpdeveloper.org/news/18813</guid>
      <link>http://www.phpdeveloper.org/news/18813</link>
      <description><![CDATA[<p>
In <a href="http://derickrethans.nl/mongoclient.html">this recent post</a> to his site <i>Derick Rethans</i> mentions the shiny new "MongoClient" class that the latest release of the <a href="http://groups.google.com/forum/?hl=en_US&fromgroups=#!topic/mongodb-announce/Oc6UkdvPcvM">Mongo PHP drivers</a> provides.
</p>
<blockquote>
This afternoon we <a href="http://groups.google.com/forum/?hl=en_US&fromgroups=#!topic/mongodb-announce/Oc6UkdvPcvM">published</a> version 1.3.0 of the MongoDB PHP driver. Besides a number of bug fixes since RC2 and RC3, this new release also includes a new MongoClient class. This new <a href="http://php.net/manual/en/class.mongoclient.php">MongoClient</a> class serves as a replacement for the Mongo class. The old Mongo class is now deprecated and will be removed in a future release, although we are keeping it in place for now because of backwards compatibility reasons. We have already removed it mostly from the documentation, and are working to update all our other material as well.
</blockquote>
<p>
The main change that comes with the MongoClient class is that it now has acknowledged writes on by default (a "safe mode"). This option determines wether or not the client waits for a confirmation from the server when a write has happened. He includes a bit of code showing how to: turn it off, keep it on or using replica set acknowledged writes. You can also set it on a per-query basis. 
</p>]]></description>
      <pubDate>Wed, 28 Nov 2012 09:13:51 -0600</pubDate>
    </item>
  </channel>
</rss>
