0

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
user3399
  • 235
  • 2
  • 11
  • Ever heard of database transactions, concurrency and locks? https://docs.oracle.com/cd/B19306_01/server.102/b14220/consist.htm – JuanR Feb 25 '19 at 15:41
  • A lot of people use `select ... for update skip locked` for this kind of scenario, see this question: https://stackoverflow.com/questions/5847228/oracle-select-for-update-behaviour - but note the answer which recommends Oracle Advanced Queues as a more robust solution. – kfinity Feb 25 '19 at 16:17

0 Answers0