• Post Reply Bookmark Topic Watch Topic
  • New Topic

Clarification on Directory Copying from 2 different machines

 
ravi v kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • 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
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!