开发者

(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.


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.


assuming you have control over the database design, wouldn't you just include flag of some kind? You could just have a yes/no kind of flag, which might be too basic (?). Alternatively a more detailed approach that recorded the identity of the process which "has" the Record / Job. This would give you a richer set of data and a more flexible application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜