[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] =?utf-8?q?svn:_/pecl/mysqlnd=5Fms/trunk/_README?=
From: Johannes_Schlüter <johannes () php ! net>
Date: 2011-04-26 9:11:56
Message-ID: svn-johannes-1303809116-310506-1679467323 () svn ! php ! net
[Download RAW message or body]
johannes Tue, 26 Apr 2011 09:11:56 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=310506
Log:
Update README
Changed paths:
U pecl/mysqlnd_ms/trunk/README
Modified: pecl/mysqlnd_ms/trunk/README
===================================================================
--- pecl/mysqlnd_ms/trunk/README 2011-04-26 08:42:49 UTC (rev 310505)
+++ pecl/mysqlnd_ms/trunk/README 2011-04-26 09:11:56 UTC (rev 310506)
@@ -1,38 +1,91 @@
-PECL/mysqlnd_ms is a mysqlnd library plugin or read-write splitting and
-load balancing to support use of MySQL replication with PHP.
+Introduction
+============
-R/W splitting is very basic: everything that is not a SELECT is send
-to the master. Everything else goes to the slaves. R/W splitting can be
-controlled by SQL hints and/or done by a user defined callback.
+The mysqlnd replication and load balancing plugin (mysqlnd_ms) adds easy to use
+MySQL replication support to all PHP MySQL extensions that use mysqlnd.
+
+As of version PHP 5.3.3 the MySQL native driver for PHP (mysqlnd) features an
+internal plugin C API. C plugins, such as the replication and load balancing
+plugin, can extend the functionality of mysqlnd.
+
+The MySQL native driver for PHP is a C library which ships together with PHP as
+of PHP 5.3.0. It serves as a drop-in replacement for the MySQL Client Library
+(AKA libmysql/libmysqlclient). Using mysqlnd has several advantages: no extra
+downloads because it comes with PHP, PHP license, lower memory consumption in
+certain cases, new functionality such as asynchronous queries.
+
+Mysqlnd plugins such as the replication and load balancing plugin operate
+mostly transparent from an user perspective. The replication and load balancing
+plugin supports all PHP applications and all PHP MySQL extensions ( mysqli,
+mysql, PDO_MYSQL). It does not change existing APIs. Therefore, it can easily
+be used with existing PHP applications.
+
-Which slave is "picked" is determined by the configured load balancing polic.
-PECL/mysqlnd_ms has built-in functionality for random, random-once,
-round-robin and user defined load balancing.
+Key Features
+============
+
+ * Transparent and therefore easy to use
+ o supports all PHP MySQL extensions
+ o no API changes
+ o very little, if any, application changes required, dependent on the usage
+ scenario required
+ * Featured read-write split strategies
+ o Automatic detection of SELECT, supports SQL hints to overrule automatism
+ o user-defined
+ * Featured load balancing strategies
+ o Round Robin: choose different slave in round robin fashion for every
+ slave request.
+ o Random: choose random slave for every slave request.
+ o Random once (sticky): choose random slave once to run all slave requests
+ for the duration of a web request.
+ o User-defined. The application can register callbacks with mysqlnd_ms.
+
+Limitations
+===========
+The plugin does not support MySQL replication setups with more than one master
+server.
-PECL/mysqlnd_ms has no automatic fail over. Manual fail over is easy:
-catch the error and run the same query again to make the load balancer choose
-the next server. Catching should be easy because you always check for return
-codes, don't you?
+The built-in read/write-split mechanism is very basic. Every query which
+starts with SELECT is considered a read request to be sent to a MySQL slave
+server. All other queries, including, for example, SHOW statements, are
+considered as write requests to be sent to the MySQL master server. The
+build-in behaviour can be overruled using SQL hints or an user-defined callback
+function.
-The plugin operates transparently from a users point of view.
-As a mysqlnd library plugin it operated on a layer beneath the user APIs
-provided by any of the PHP mysql extensions.
+The read/write splitter is not aware of multi-statements. Multi-statements are
+considered as one statement. The decision of where to run the statement will be
+based on the beginning of the statement string.
- PHP
- |
- mysql mysqli PDO_MYSQL
- |
- mysqlnd
- |
- PECL/mysqlnd_ms
+The plugin does not support native prepared statements. Please note that
+PDO_MySQL is using a client-side prepared statement emulation by default.
+Client-side emulated prepared statements are fully supported by the replication
+and load balancing plugin because the emulation is not using native prepared
+statements. If you are using PHP based database abstraction, please consult the
+vendor manual to learn if a client-side prepared statement emulation is used.
+
+On the name
+===========
- |
+The shortcut mysqlnd_ms stands for mysqlnd master slave plugin. The name was
+choosen for a quick-and-dirty proof-of-concept. In the beginning the developers
+did not expect to continue using the code base.
- MySQL
+Installation
+============
+If your system has the PEAR and PECL tools installed this plugin can be installed
+by a single command from the command line.
-Please check http://blog.ulf-wendel.de/?p=299, the examples/ directory and
-the test/ directory for further information until documentation becomes available.
+If you want to use the stable version:
-Do not use PECL/mysqlnd_ms in production environments, yet!
-It is a proof-of-concept. It is pre-alpha!
\ No newline at end of file
+ # pecl install mysqlnd_ms
+
+If you want to use an alpha version:
+
+ # pecl install mysqlnd_ms-alpha
+
+Further information
+===================
+
+Please refer to the full documentation on http://php.net/mysqlnd_ms
+
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic