News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Daniel Jensen's Blog:
Database gearman worker in PHP example
August 16, 2010 @ 14:51:25

Daniel Jensen has a new post about using Gearman to do some simple database inserts asynchronously.

If you need to do a lot of inserts in your DB with a certain line of order they should be carried out in or with a clean-up script following after the inserts and you don't have to wait for a reply from MySQL, the answer to that problem might be this worker written in PHP for Gearman as an interface for your DB. A MySQL crash or a worker crash will have no impact on your inserts because they will just stay in the Gearman queue until the system is running again.

He includes a code snippet showing a sample database Gearman worker written in PHP to run simple database queries. His example uses a simple database connection (a basic wrapper around a mysql_query) and the line of code to run the worker.

0 comments voice your opinion now!
database gearman asynchronous example


blog comments powered by Disqus

Similar Posts

Ralph Schindler's Blog: Compiling Gearman (or anything) for Zend Server CE on Snow Leopard

CodePoets.co.uk: How to use PHP and PEAR MDB2 (Tutorial)

Site News: Blast from the Past - One Year Ago in PHP

Vinu Thomas' Blog: Modifying your MySQL databases to be UTF-8 compliant

VG Tech: Avoid Dependency on 3rd Party Sources with Composer


Community Events





Don't see your event here?
Let us know!


series framework deployment api bugfix introduction library interview package podcast opinion install community zendserver symfony laravel language unittest release voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework