Skip to content

Conversation

@bipin1611
Copy link
Contributor

@bipin1611 bipin1611 commented Oct 28, 2025

Feature:

  1. To avoid concurrency request by a single user, implements locking mechanism.
    For Example, when a particular user's request comes in, we will create lock files, which will be unlock and deleted. And a user request sends request at the same, second request will be sent to queues untill we give response.
    This method used by PHP's core session management.

  2. At Post & Advertisement creation, we should have to wrap in DB transaction.

@bipin1611 bipin1611 requested a review from vidkazan October 28, 2025 15:28
@bipin1611 bipin1611 self-assigned this Oct 28, 2025
@bipin1611 bipin1611 changed the title feat(implement locks): add locks mechanism to queue request feat(locks): implement locks mechanism to queue request Oct 28, 2025
@bipin1611 bipin1611 changed the title feat(locks): implement locks mechanism to queue request feat(locks & db tnx): implement locks mechanism and unify db tnx Oct 29, 2025
{
return $this->db->rollBack();
}
public function isTransactionActive(): bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can review alternative solutions to this and considering all pros/cons choose the best one

@vidkazan vidkazan self-requested a review November 5, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants