Open rishabhpoddar opened 4 years ago
Essentially locking can be achieved by consensus across cores. We can achieve consensus by having an ordered queue in the database (using ordered UUIDs). Core1 would insert some UUID, Core2 would insert something else. They both would read both the UUIDs, and order them, and if Core1's UUID is "first", then Core1 knows it is the winner.
❓ Questions and Help
This issue is related to: https://github.com/supertokens/supertokens-plugin-interface/issues/3