Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locking design
Message
From
23/02/2015 18:03:38
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
Locking design
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01615752
Message ID:
01615752
Views:
64
I am looking for the best locking design on a very particular situation.

I have a lot of robots running on several servers. All of them are running several times per minute and, at the end, they need to update a statistical table. Once every 15 minutes, I also have another robot which does some more intensive process on the statistical table.

When the robot which runs every 15 minutes does it job, it will look to see if the daily record exist. If not, it will create it. Then, we populate the stats for the day on that particular record. However, all other robots are doing the same verification. If the daily record does not exist, they will create it. So, it is a question of who gets it first. I discovered that I ended up with two or sometimes three daily records and this was because the more active robots are sometimes also seeing that the daily record does not exist and they will attempt to create it.

So, I need to enhance that, from some kind of locking approach, so that if the daily record does not exist only one will be able to create it.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform