Description
Description
With the release of RoadRunner version 2023, a new lock plugin has been added that provides exclusive access to shared resources in a distributed environment. The plugin offers a fast, lightweight, and reliable way to manage locks.
Currently, there is no integration between the RoadRunner lock plugin and the Symfony lock component. It would be great to have a new driver that provides seamless integration with the RoadRunner lock plugin.
The RoadRunner lock plugin already has an integration package available roadrunner-php/lock that provides all the necessary information on how to use it.
Thank you for considering this feature request. Let me know if you have any questions or need any further information.
Example
Here's an example of how the RoadRunner lock plugin can be used in PHP:
use RoadRunner\Lock\Lock;
use Spiral\Goridge\RPC\RPC;
require __DIR__ . '/vendor/autoload.php';
$lock = new Lock(RPC::create('tcp://127.0.0.1:6001'));
// Acquire lock
$id = $lock->lock('pdf:create');
// Release lock after task is done
$lock->release('pdf:create', $id);
// Check lock status
$status = $lock->exists('pdf:create');