Download the PHP package konstantin-kuklin/handlersocket-library without Composer
On this page you can find all versions of the php package konstantin-kuklin/handlersocket-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download konstantin-kuklin/handlersocket-library
More information about konstantin-kuklin/handlersocket-library
Files in konstantin-kuklin/handlersocket-library
Package handlersocket-library
Short Description HandlerSocket protocol wrapper on native PHP
License MIT
Homepage https://github.com/KonstantinKuklin/HandlerSocketLibrary
Informations about the package handlersocket-library
Rus docs
Introduction
HandlerSocket plugin for MySQL has been presented in 2010.
Plugin greatly speeds up the data stored in MySQL, and allowed to use this database as a NoSQL storage without the overhead associated with using SQL.
This library is an implementation of the protocol HandlerSocket completely written in PHP.
As a result, using HandlerSocket can provide much better performance for certain applications that using normal SQL application protocols.
Motivation
In the yard in 2014, and is still the tool and manuals on the use HandlerSocket similar to the experimental or under development.
I had not liked a ready-made solution, so I decided to write my bike and ride it.
Why you should use HandlerSocket:
- data consistency;
- high performance;
- сompact protocol;
- сompatible with MySQL replication;
- comes out of the box in PerconaServer, MariaDB.
The table below shows a comparison of the performance of different programs allow you to save or to load data.
approx qps | User CPU util | System CPU util | |
---|---|---|---|
MySQL via SQL | 105,000 | 60% | 28% |
Memcached | 420,00 | 8% | 88% |
MySQL via HandlerSocket | 750,000 | 45% | 53% |
How to install
How to install HandlerSocket can be found on the internet or just download PerconaServer or MariaDB.
Start using HandlerSocketLibrary is very simple.
Add to composer.json:
How to connect
Open connection to the read only socket and to authorize the password 'passwordRead'.
Open connection to the write socket, no password is specified.
Queries
-
Open Index
-
Select
-
Insert
-
Update
-
Delete
-
Increment
- Decrement
Benchmarks
Comparison with the basic libraries for PHP.
The list will participate HSPHP, written in PHP, HandlerSocket, written in C.
HSPHP (PHP) HandlerSocket (c-extension) HandlerSocketLibrary (PHP)
How to help
I would be glad to see your suggestions, feedback and reports of bugs found.
If the program is interesting, it'll expand its functionality.
License
This library is available under the MIT license.