I'm trying to get several Applications to work concurrently on the same table, from the same database.
The difficulty I have is to prevent those software to work concurrently on the same set of Data.
To bring a bit of context :
- We have a set of n windows services working on one DataBase.
- Our DataBase is Oracle
- We are using C# for writing the Services
- The Services will be installed on separate machines.
- The Services will be working on the same Table
- The Services cannot work on the same rows, they need to work on different ones.
We have already found a few solutions, the two main runners are :
Use a modulo to discriminate the different rows that can be used by a Service.
Have the services pick the rows from a Queue instead of a DataBase.
But I was wondering if there was any simpler, or more efficient ways to do this.
Edit : To be a bit more clear, there is what the services are supposed to do :
- Load Data from Table A into local objects
- Modify those local objects
- Insert local objects into Table B