Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper way to recycle record
Message
De
19/01/2015 10:04:25
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Proper way to recycle record
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01613891
Message ID:
01613891
Vues:
55
I have a Hit table, such as pretty much all Web sites, which contains all the hits to the Web site. For now, I have used a robot process to clean that table every 15 minutes for records older than two months. As the application grows, the number of hits are getting significant. As SQL Server does not allow to remove a record from a table as is, but to keep a log transaction on it, the process of deleting 200,000 records can be somewhat intensive. If there would not be any log transaction, that would be done pretty much instantly.

So, I need to look at a recycle approach to eliminate that robot process. The thing is, I need a recycle technique that will avoid collision. My main architecture is to assign a recycle record to a user which will not collapse with the same request from another user. I have 8 hits per second. How can I be sure to assign a record in the Hit table to be used for a recycle for one user which will not be the same as another user looking up the Hit table to detect which record to recycle which will not be the same as the other user?

When the application initializes, I am using a SyncLock approach from an object of oApp to make sure only one hit will initialize the worker process instance. So, I have four worker processes and if 10 hits are simultaneous, only one will initialize on a particular worker proces. Maybe I can use something similar here.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform