Use RMI to achieve parallelism?

I want to distribute array sorting works to two machines. I am now doing in this way :-

First of all, I try to divide the array into two small arrays and pass them to two machines, then invoke the RMI sorting function in each machine. After that, I get two sorted arrays and then merge them into single sorted array.

Here my questions :-

1) In order to achieve parallelism, should I need to write a multi-threading client so that both RMI sorting functions can run simultanously? How can I do this? I think it will involve complex remote objects coordination.... right? Where can I find some sample codes?

2) Any technique to minimize the array spliting and merging works?

1000 thanks!

Alan

[741 byte] By [ipss2001] at [2007-9-26 1:55:14]
# 1
Hello,Are you using a 3 rd machine as a server?and you want both clients to invokesort() function on a server at the same time?pathreading
pathreading at 2007-6-29 3:08:48 > top of Java-index,Core,Core APIs...
# 2

No.

I use machine A, B & C.

Machine A will be the client, whereas B & C are sorting servers.

I have an array (let's say 100,000 items) to sort. First of all, I split the array into two half (each 50,000 items), then send first half as a parameter to sorting server running at B and the second half to C.

So I expect B & C do sorting simulatously and return two sorted sub-arrays to A, then A can merge those two sorted sub-arrays to get the final sorted array.

ipss2001 at 2007-6-29 3:08:48 > top of Java-index,Core,Core APIs...