GeeCON Prague 2014*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Prioritised Shared Resource Design Pattern - Advice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Prioritised Shared Resource Design Pattern - Advice" Watch "Prioritised Shared Resource Design Pattern - Advice" New topic
Author

Prioritised Shared Resource Design Pattern - Advice

Mark Brownengland
Greenhorn

Joined: Apr 30, 2006
Posts: 26
I have a re-occuring problem on multiple Java based projects I am involved in that would appear to be ripe to be addressed by a common design pattern.

The premise of the problem is: There is a need for concurrent data processing that requires use of a shared resource set which is persisted in a database.

The solution should: Ensure data integrity, provide high performance and ensure there are no deadlocks.

The expected behaviour is: A thread is able to query the database and to be returned the next highest priority resource and then within the same transaction is able to persist a modified state of that resource. Within the lifecycle of that thread, an additional resource is able to be persisted in certain situations.

Constraints: The current persistence technology adopted is a schemaless DB which only offers database level locking.


With the exception of the above constraint, the above problem appears to be quite a common problem so I'd appreciate knowing if there are any related enterprise/architecture design patterns which optimally solve this problem?

Also interested to know the technology stack that you would use to meet the solution requirements and expected behaviour?
 
GeeCON Prague 2014
 
subject: Prioritised Shared Resource Design Pattern - Advice