Created: 2012-03-23 22:03
Updated: 2013-03-26 03:59
License: mit


JESync-php is the php driver to connect to the JESync Server


include 'jesync-php.php'; //includes auto loading stuff
$je=new JESync();

$timeout=4; //seconds
$maxConcurrent=1; //only 1 lock can be granted at a time for the key

//This call will block until the lock is granted or timeout has passed
	//Yeeehaa we have the lock
	$h->release(); //lock released
	// :( lock request timed out

Multiple Servers

You can use multiple servers with a single JESync object. When lock() is called, the key is hashed against the server list and the key is locked in that particular server only. It is a simple way to "horizontally scale" inspired in memcached mechanism.


The driver is being used on several PHP scripts on Pixable backend

Feel free to use it and improve it!

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more