I am implementing a simple pessimistic locking mechanism using Postgres as a medium. The goal is that multiple instances of an application can simultaneously acquire locks on distinct sets of users. The app instances are not trying to lock specific users. Instead they will take any user locks they can get. Say, for example, we have three instances of the
Tag: multithreading
Multithreading for queries in SQL Database
Suppose I have a database, for example, for messenger. My app is collecting messages and stores them in my database. It doesn’t matter what type of database it is (i want to know how it is usually embodied and does my database support it, and are there other databases that do if it doesn’t), but in my case it is
MySQL: How to hold lock and make other threads wait for an insert that hasn’t happened yet
I’m confronted by a seemingly simple problem that has turned out to be pretty hard to figure out. We want to keep a record of every time we’re presented with a piece of marketing (a lead) so we don’t …