Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORM Concurrency Control #2269

Open
mike-5345 opened this issue Mar 2, 2025 · 2 comments
Open

ORM Concurrency Control #2269

mike-5345 opened this issue Mar 2, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@mike-5345
Copy link

Notice
If you need support or clarification regarding the usage of Drogon in your project, visit the official Drogon support channel at gitter

Please create a new issue only if you think you have found a bug or if have a feature request/enhancement.

Is your feature request related to a problem? Please describe.
I am considering Drogon for a project but I am concerned that I have not found any reference to concurrency control in the ORM docs (pessimistic or optimistic).

Describe the solution you'd like
I would like concurrency control for the ORM. Currently, as far as I am aware, there is no concurrency control.
If there is one, does it use optimistic or pessimistic concurrency control?

Describe alternatives you've considered
The company Code Synthesis offers C++ ORM called ODB. They implement optimistic concurrency control. Unfortunately they do not offer an asynchronous interface for their ORM.

@an-tao an-tao added the enhancement New feature or request label Mar 3, 2025
@an-tao
Copy link
Member

an-tao commented Mar 3, 2025

@mike-5345 Thanks so much for your feedback.
Yes, drogon's transaction does not provide such fine-grained control. Pessimism or optimism depends on the database configuration. We can consider adding it in the future. Do you have any good suggestions?

@mike-5345
Copy link
Author

Well I'm by no means an expert on this topic. ODB, the other ORM I mentioned, has a version column that is checked before every modifying transaction against version number the caller has in their object. The implementation throws if those version numbers are not the same prompting the caller to deal with the conflict.

I understand if this is beyond the scope of the project, but it would make Drogon a much more appealing offer.

Thanks for the prompt response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants