Author: Colin McKinnon
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:
Comments:
No comments were submitted yet.