https://github.com/netresearch/t3x-nr_lock
Move TYPO3 locking into redis/couchbase
https://github.com/netresearch/t3x-nr_lock
Last synced: 8 months ago
JSON representation
Move TYPO3 locking into redis/couchbase
- Host: GitHub
- URL: https://github.com/netresearch/t3x-nr_lock
- Owner: netresearch
- Created: 2014-07-31T09:19:21.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-25T12:18:32.000Z (almost 12 years ago)
- Last Synced: 2024-04-15T02:08:26.697Z (over 2 years ago)
- Language: PHP
- Homepage:
- Size: 172 KB
- Stars: 1
- Watchers: 18
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: ChangeLog
Awesome Lists containing this project
README
Netresearch distributed lock manager
====================================
.. contents:: Contents
Overview
========
NR_Lock is a distributed lock manager (DLM).
This is designed for multiple TYPO3 frontend servers using a single typo3temp
share and Database.
NR_Lock currently supports single Redis or Couchbase (experimental) caching
server as locking instance.
It replaces/extends the TYPO3 lock facility t3lib_lock.
Requirements
============
- Redis: => 2.4 - 2.8
- Couchbase: => ???
- PHP => 5.3 - 5.5
- TYPO3 => 4.5 - 6.2
- PHP/redis => 1.6
Installation
============
Installation is done by TYPO3 extension manager.
Configuration
=============
To set up NR_Lock as a replacement for t3lib_lock you need to alter your
localconf.php in /typo3conf/ and add the following lines::
$arLockCfg = &$TYPO3_CONF_VARS['SYS']['locking'];
if (extension_loaded('redis')) {
$arLockCfg = array(
'backend' => '\Netresearch\Lock\Backend_Redis',
'options' => array(
//'hostname' => 'localhost',
//'port' => 6379,
//'database' => 0,
//'password' => '',
//'compression' => false,
//'compressionLevel' => 1,
),
);
} elseif (extension_loaded('couchbase')) {
$arLockCfg = array(
'backend' => '\Netresearch\Lock\Backend_Couchbase',
'options' => array(
'servers' => array(
'localhost',
),
),
);
}
ToDo
====
- Support multiple caching server.
- Test using LIST for locks with redis (performance).
- Use nr_lock in TYPO3 6.2 ClassLoader - this is currently hard coded in the TYPO3 core
References
==========
- http://www.couchbase.com/
- http://www.redis.io/
- http://redis.io/topics/distlock
- https://engineering.gosquared.com/distributed-locks-using-redis
- https://github.com/ronnylt/redlock-php