Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Making a stand-alone database-driven app to a multi-threaded one

 
Sai Swami
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jolly Ranchers,


I have a simple stand-alone Java app that reads from one database (only SELECT) and adds data to another database. The table structure in both the databases is not the same. There are around 4000 records.
I need to make this process a multi-threaded one where each set of operations is executed concurrently.

Can anyone please throw some light on the design? Also, what points should I keep in mind?




Thanks a LOT for your time
~Sai
 
Ajay Saxena
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell us more about what you mean by "each set of operations". I see only two operations,reading from DB x and writing into DB y.
Do you intend to read batches of records ( e.g. say 400 records per batch) concurrently in different threads?
 
Gerbrand van Dieijen
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a homework assignment.

Start with dissecting the problem, by describing in detail what you want to accomplish (what needs to run in parallel, should results be combined, what is an operation, etc.) . The solution will then be a lot easier.
 
Sai Swami
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ajay,

Reading from db x and writing to db y is a "set". They should happen together.

Hope this helps,
Sai
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic