Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Proposal: new Lock component #20382

Closed
Closed
@jderusse

Description

@jderusse

The new 3.2 release of Symfony improve the integration of the framework in containers (cache, dynamic env vars, etc...).
With such containers, it's easier to scale our services no matter the physical machine where the service ends up. But this bring a new issue: sometimes services need to lock some things, and actually, the framework only expose a "local" filesystem lock (which is good and efficient for a local usage).

At first I just wanted to create a PR to add a new RedisLockHandler (which implement the redlock strategy). But I wonder where to put the code. IMO, it doesn't make sens to add such feature in the filesystem component.

That's the subject of this issue:

  • Do we need such feature in Symfony.
  • Where should it be located (new component?)

If a new component is created, then, other lock could be implemented:

  • filesystem
  • semaphore
  • memcached
  • redis
  • pdo

Such cross-network locks could solve issues like #4976

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions