Author: Colin McKinnon
Updated on: 2014-11-24
Posted on: 2014-11-24
Package: Item Cache
Using itemcache to speed up writes
Most of you should be familiar with the idea of write buffers batching up output to improve throughput. From the Nagle algorithm for handling individual packets to output buffering in PHP the trade-off in latency leads to huge gains.
Another place where this can be applied is in writes - particularly to databases. Batching up multiple INSERT operations on MySQL can double throughput.
ItemCache's overflow handler provides a mechanism for doing exactly that - and since the class is a connector to your tool of choice for carrying out the writes - PDO, Mysql[i], SQLite, fopen/fputs...(hint: mysqli's asynchronous query support allows for parallel processing by PHP and the DBMS), it should be easy to create novel, high performance solutions.
You need to be a registered user or login to post a comment
Login Immediately with your account on:
No comments were submitted yet.