The second laboratory assignment of the semester is to study some low level capabilities of each of the scripting languages in question.
In that regard, we shall, on the 'master' machine generate a collection of random numbers and store them in an array. We shall then establish two threads, split the array, and in each of the threads establish a socket connection to two slave machines, pass the halves of the arrays to each of the slaves for sorting, which (theoretically) will happen simultaneously (in parallel). The master process will wait for each of the slaves to send back their sorted portions of the arrays, will then merge the sorted arrays and display the original array in sorted form.
You must time each of the results and find which of the languages has the most efficient thread- socket communication capabilities.
To further the experiment, you can use different size original arrays, and also if you can do this for two threads, you should be able to do it for four, eight, sixteen, etc. threads
The objectives of the exercise include learning threads, low level socket communication, and whether or not the languages have appropriate capabilities in this area. We also wish to examine how easy (hard) the languages are to facilitate this kind of programming.
See class notes for details, or contact your instructor.