php-doc-en/reference/mysqlnd_memcache/book.xml
Philip Olson 758580b4dd Fixed typo
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@329312 c90b9560-bf6c-de11-be94-00142212c4b1
2013-01-28 18:07:48 +00:00

150 lines
5.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<book xml:id="book.mysqlnd-memcache" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Mysqlnd Memcache plugin</title>
<titleabbrev>mysqlnd_memcache</titleabbrev>
<preface xml:id="intro.mysqlnd-memcache">
&reftitle.intro;
<para>
The mysqlnd memcache plugin (<literal>mysqlnd_memcache</literal>) is an PHP
extension for transparently translating SQL into requests for the
MySQL InnoDB Memcached Daemon Plugin (server plugin). It includes
experimental support for the MySQL Cluster Memcached Daemon. The server
plugin provides access to data stored inside MySQL InnoDB (respectively
MySQL Cluster NDB) tables using the Memcache protocol.
This PHP extension, which supports all PHP MySQL extensions that use
<link linkend="book.mysqlnd">mysqlnd</link>, will identify tables exported in
this way and will translate specific SELECT queries into Memcache requests.
</para>
<mediaobject>
<alt>mysqlnd_memcache data flow</alt>
<imageobject>
<imagedata fileref="en/reference/mysqlnd_memcache/figures/mymemflow.png"/>
</imageobject>
</mediaobject>
<note>
<para>
This plugin depends on the MySQL InnoDB Memcached Daemon Plugin. It is not
provided to be used with a stand-alone Memcached. For a generic query cache
using Memcached look at the <link linkend="book.mysqlnd-qc">mysqlnd query
cache plugin</link>. For direct Memcache access look at the
<link linkend="book.memcache">memcache</link> and
<link linkend="book.memcached">memcached</link> extensions.
</para>
</note>
<para>
The MySQL native driver for PHP is a C library that ships together with
PHP as of PHP 5.3.0. It serves as a drop-in replacement for the
MySQL Client Library (libmysql/libmysqlclient). Using mysqlnd has
several advantages: no extra downloads are required because it's bundled with PHP,
it's under the PHP license, there is lower memory consumption in certain cases, and
it contains new functionality such as asynchronous queries.
</para>
<para>
The <literal>mysqlnd_mmemcache</literal> operates, for the most part,
transparently from a user perspective. The mysqlnd memcache
plugin supports all PHP applications, and all MySQL PHP extensions.
It does not change existing APIs. Therefore, it can easily be used with
existing PHP applications.
</para>
<para>
The MySQL Memcache plugins add key-value style access method for data stored
in InnoDB resp. NDB (MySQL Cluster) SQL tables through the Memcache protocol.
This type of key-value access if often faster than using SQL.
</para>
<section xml:id="mysqlnd-memcache.key-features">
<title>Key Features</title>
<para>
The key features of PECL/mysqlnd_memcache are as follows.
</para>
<para>
<itemizedlist>
<listitem>
<para>
Possible performance benefits
</para>
<para>
<itemizedlist>
<listitem>
<para>
Client-side: light-weight protocol.
</para>
</listitem>
<listitem>
<para>
Server-side: no SQL parsing, direct access to the storage.
</para>
</listitem>
<listitem>
<para>
Please, run your own benchmarks! Actual performance results are
highly dependent on setup and hardware used.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="mysqlnd-memcache.limitations">
<title>Limitations</title>
<para>
The initial version is not binary safe. Due to the way the MySQL Memcache
plugins works there are restrictions related to separators.
</para>
<para>
Prepared statements and asynchronous queries are not supported. Result set
meta data support is limited.
</para>
<para>
The mapping information for tables accessible via Memcache is not cached
in the plugin between requests but fetched from the MySQL server each time
a MySQL connection is associated with a Memcache connection. See
<function>mysqlnd_memcache_set</function> for details.
</para>
</section>
<section xml:id="mysqlnd-memcache.name">
<title>On the name</title>
<para>
The shortcut <literal>mysqlnd_memcache</literal>
stands for <literal>mysqlnd memcache plugin</literal>.
Memcache refers to support of the MySQL Memcache plugins
for InnoDB and NDB (MySQL Cluster). The plugin is not
related to the Memcached cache server.
</para>
</section>
</preface>
&reference.mysqlnd-memcache.quickstart;
&reference.mysqlnd-memcache.setup;
&reference.mysqlnd-memcache.constants;
&reference.mysqlnd-memcache.reference;
&reference.mysqlnd-memcache.changes;
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->