Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Design Idea) Best Practise to reserve record for multi-process workflow engine

I'm designing multiple process to query job from database.

Each job wake up once per minute to query task and send to workflow system.

I need advice about which best way to mask record and query it and not duplicate with other process.

like image 540
Hlex Avatar asked Nov 18 '25 00:11

Hlex


1 Answers

In Oracle, depending on version:

10g and down -- use Advanced Queuing. Have your job dequeue the keys that you've had enqueued.

11g and up -- if you don't want the hassle of queuing, you can use the SKIP LOCKED clause and have your job SELECT FOR UPDATE the task it's to work on; think of it as queuing without having to make PL/SQL calls.

like image 83
Adam Musch Avatar answered Nov 20 '25 15:11

Adam Musch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!