agritheory / beam

General Purpose 2D barcode scanning for ERPNext
https://agritheory.com/documentation/beam/
Other
20 stars 9 forks source link

[demand] Wrap access to `demand.db` with ACID compliant file handler #109

Closed agritheory closed 2 weeks ago

agritheory commented 2 months ago

It is likely that multiple workers or processes will want to access demand.db at the same time. Multiple reads should be fine, multiple write should not. Using an ACID compliant file handler like ACID files should be a reasonable solution to this that allows us to avoid a DBMS layer.


For discussion sake, I think it would be appropriate to mention network-friendly implementations of this idea.

agritheory commented 3 weeks ago

ACID Files does not seem to be maintained. Let's look at Filelock instead

MyuddinKhatri commented 3 weeks ago

ACID Files does not seem to be maintained. Let's look at Filelock instead

@agritheory I think we can use this frappe has https://github.com/frappe/frappe/blob/develop/frappe/utils/synchronization.py#L18 this seems like a wrapper around filelock.

agritheory commented 3 weeks ago

@MyuddinKhatri Perfect, let's use that.