concurrency - Oracle database as a single synchronization point for two separate web applications -


i considering using oracle database synchronize concurrent operations 2 or more web applications on separate servers. database single infrastructure element in common applications.

there chance 2 or more applications attempt perform same operation @ exact same moment (cron invoked). want use database let 1 application decide 1 work, , others not @ all.

the general idea perform somehow-atomic , visible connections select/insert node's id. node has same id first inserted node id returned select work.

it suggested me merge statement can of use here. however, after doing research, found discussion states the merge statement not designed called

another option lock table. definition, 1 node able lock server , insert, select. after lock removed, other instances see inserted value , not perform work.

what other solutions consider? frown on workarounds random delays, or using oracle exceptions notify node should not work. i'd prefer clean solution.

i ended going select update. works intended. important remember commit transaction needed update made, other nodes don't hang waiting value.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -