{"id":21277955,"url":"https://github.com/b13/distributed-locks","last_synced_at":"2025-04-17T22:56:50.406Z","repository":{"id":34978239,"uuid":"193657744","full_name":"b13/distributed-locks","owner":"b13","description":"Adds a Redis Locking Strategy for TYPO3 frontend page generation, useful on distributed systems with NFS.","archived":false,"fork":false,"pushed_at":"2024-06-21T12:44:01.000Z","size":33,"stargazers_count":12,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T06:11:32.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-25T07:31:37.000Z","updated_at":"2024-06-20T14:16:48.000Z","dependencies_parsed_at":"2024-06-20T22:19:00.396Z","dependency_job_id":"12f6fc2c-7d59-4dd9-9107-c7d64a46bc96","html_url":"https://github.com/b13/distributed-locks","commit_stats":{"total_commits":18,"total_committers":9,"mean_commits":2.0,"dds":0.6111111111111112,"last_synced_commit":"4cc1e06a5031108a4d2743915e22aecff3dd9906"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fdistributed-locks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fdistributed-locks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fdistributed-locks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fdistributed-locks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b13","download_url":"https://codeload.github.com/b13/distributed-locks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249389095,"owners_count":21262840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T10:08:24.281Z","updated_at":"2025-04-17T22:56:50.377Z","avatar_url":"https://github.com/b13.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Distributed Redis Locker for TYPO3 Locking Mechanism\n\nTYPO3 has three built-in Locking Strategies, that are chosen at runtime which fits best for the current system\nsetup.\n\n* SemaphoreLockStrategy\n* SimpleLockStrategy\n* FileLockStrategy\n\nHowever, when dealing with a multi-tier system and a shared file system with multiple frontend nodes with a NFS\nfilesystem, it is especially helpful to use a better suitable format. Redis is our weapon of choice for handling\nmulti-node scenarios, and works just fine with TYPO3 and Caching.\n\nThis extension provides a Redis Locking mechanism to store the locks in a (shared) Redis database.\n\n## Requirements\n\nThis extension is available for TYPO3 v8+ LTS, and requires the PHP package `php-redis` as well as a Redis server.\n\n## Installation\n\nInstall this extension via composer `composer require b13/distributed-locks` or extensions.typo3.org / Extension Manager,\nand activate it in the Extension Manager.\n\nNow add the following lines to your LocalConfiguration / AdditionalConfiguration to activate Redis Locking.\n\n    $GLOBALS['TYPO3_CONF_VARS']['SYS']['locking']['redis'] = [\n        'hostname' =\u003e '127.0.0.1',\n        'database' =\u003e 12\n    ];\n\nOther options:\n\n    'ttl' (numeric, default is 30sec)\n    'port' (numeric, default is 6379)\n    'password' (contains the password, necessary for secure authentication if required by redis)\n    'priority' (numeric, default is 95) - Set priority for this locking strategy. See LockingApi documentation.\n\n## Disabling it in certain contextes\n\nIf you have different `TYPO3_CONTEXT` or environments and you want to switch off the complete redis\nstrategy (i.e. in your staging machine), you can set this in your LocalConfiguration / AdditionalConfiguration:\n\n    $GLOBALS['TYPO3_CONF_VARS']['SYS']['locking']['redis']['disabled'] = true;\n\n## Future Development\n\nShould be switched to `symfony/lock` to allow distributed redis services and other lockers.\n\n## Credits \u0026 Background \n\nInspiration was taken from the now unmaintained extension \"redis_lock_strategy\" which we used several times, however\nwith some drawbacks:\n\n* No stable version for TYPO3 v9 in composer mode\n* No maintainer available for releases anymore\n* Destroying an object did not remove locks, ending in certain dead lock scenarios in broken scripts\n\nThanks to Alexander Miehe for the initial extension and the conceptual work.\n\n## Sharing our expertise\n\n[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fdistributed-locks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb13%2Fdistributed-locks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fdistributed-locks/lists"}