How to lock entries in the database to avoid double-processing using Update with limit
Many services have some sort of job that gets executed at regular intervals and does some sort of processing or aggregation. In many instances you read data from the database, do the needed calculations and write the result. This is pretty straightforward and normally does not pose any major problems. You have @Scheduled in Spring, Scheduled Tasks in Play or a simple CRON job that gets executed at regular intervals. Everything works fine if you have one instance that does...