• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic