2017 © Pedro Peláez
 

library ha-proxy

Basic HAProxy Split R/W implementation for PDO

image

t4g/ha-proxy

Basic HAProxy Split R/W implementation for PDO

  • Monday, August 18, 2014
  • by t4g
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

HAProxy

Introduction

This project exposes the following namespaces for use in your custom use: * CSI\Drivers\PDO\HAProxy, (*1)

### EXAMPLE

For Vanilla FW

    use CSI\Drivers\PDO

    $proxy = new HAProxy();
    $proxy->CreatMaster('mysql:host=MASTER_DB_HOST;dbname=MASTER_DB_NAME','MASTER_DB_USER','MASTER_DB_PASSWORD');
    $proxy->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');


    // Framework::setup($proxy);

For PDO override

    use CSI\Drivers\PDO\HAProxy as PDO;

or:, (*2)

    if ($dsn instanceof PDO || $dsn instanceof HAProxy) {

    This line happens twice on current RedBean v3.0.1, on lines 29 and 1937 on rb.php file. Repalce both.

or:, (*3)

    $SOME_PDO  ...

    $SOME_PDO = new HAProxy($SOME_PDO);
    $SOME_PDO->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');


    \PDO $SOME_PDO  ...

Limitations

HAProxy supports the simplest MySQL Replication setup, where you have a Master, and a readonly., (*4)

Contributors & Authors

@t4g @mauricoder, (*5)

The Versions

18/08 2014

dev-master

9999999-dev

Basic HAProxy Split R/W implementation for PDO

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Kyle Younge
by mauricoder

18/08 2014

dev-develop

dev-develop

Basic HAProxy Split R/W implementation for PDO

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Kyle Younge
by mauricoder

18/08 2014

1.2.4

1.2.4.0

Basic HAProxy Split R/W implementation for PDO

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Kyle Younge
by mauricoder