• 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

Clarification on Directory Copying from 2 different machines

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi There,

I had a requirement to copy a specific set of directories from 2 servers. and after copying i need to rename them and do some task.
i am planning to do it with Threads like
i will have
->Bean for Copying (2 threads ex thread1 and thread2)
-> Bean for Renaming...doing other task(ex thread3)

first bean i will create 2 threads in which thread1 will get files from server1 and thread2 will get files from server2
once this threads finish the task it should notify the thread3, so that thread3 will carry on with renaming process and other stuff.

can you please suggest good design for this requirement also suggest which will be good.

thanks in advance!!
Ravi
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I doubt that spawning off threads to copy files would be faster than copying files inline. File operations are going to be bound by network and disk throughput. Adding threads to the equation won't make either of those things faster.
The only reason I'd add a thread is if I had a progress bar or other display, as one needs a "worker thread" to free up the GUI for updating.
 
A timing clock, fuse wire, high explosives and a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic