aspose file tools*
The moose likes JDBC and the fly likes Serial and parallel read transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Serial and parallel read transaction" Watch "Serial and parallel read transaction" New topic
Author

Serial and parallel read transaction

kali wara
Greenhorn

Joined: Aug 15, 2007
Posts: 5
Hi all! Please help me get the answer of the following questions. Thanks in advance.

An experimental database that receives only read transactions in parallel. The database is read only. With each transaction there is a priority level of how critical it is for the transaction to complete. For example, priority HIGH transactions are processed ahead of priority LOW and even priority MEDIUM. The database can only respond to "n" transactions at a time.

Assume n=1...

What type of algorithm can be develop to process the transactions based on these requirements?

Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

This doesn't sound terribly complicated. Am I missing something?

A priority queue would probably suffice to manage this. If low priority transactions should be interrupted to allow higher priority transactions to run, and various resources (memory, IO, CPU) had to be managed somehow, that would be complicated. But your requirement does not seem to mention this.

kali wara
Greenhorn

Joined: Aug 15, 2007
Posts: 5
Mostly i am looking for the algorithm to process the transactions bases on that requirements
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

I don't understand what exactly is your task.

Do you need to implement processing of individual transactions? If so, you need to tell us what these transactions need to do and what specific problems did you encounter.

Is the processing already implemented somehow and you just need to execute them according to their priority? This seems quite straightforward to me, so if you're stuck with this one, please be more specific.

Do you need to interrupt processing of low-priority transaction to handle high-priority transaction as soon as it arrives? This can get tricky. I'm not sure whether I could help with this one, but I can try if you confirm that this is your problem.
kali wara
Greenhorn

Joined: Aug 15, 2007
Posts: 5
I think processing already implemented somehow and we just need to execute them according to their priority.
 
wood burning stoves
 
subject: Serial and parallel read transaction