POV-Ray is a graphical application to transform images using a technique, known as ray tracing, so to produce a high degree of visual realism but it is computationally expensive.
The main goal of this coursework is to transform the code in code.tgz (a variant of the model answer of CW1) so that the image elaboration is done remotely according to the requirements specified in each question. More precisely, the goal is to develop services for elaborating and merging the images and test them with simple clients.
Warning To answer the questions below, you can introduce any classes you need (this depends on your design). However, in all your answers, you have to respect the following naming conventions
After inspecting this code, design a possible solution for the distributed scenario above such that
Write all the interfaces necessary to implement objects servers and clients assuming that elaborated images are stored on the machine of MergingService.
Hint. The code for transforming files to arrays of bytes and viceversa (necessary only in Question 2 and Question 3) is given in the class FileHandling.java. Such class is not part of the assessment, namely you do not have to decide whether the objects of FileHandling.java is local or remote: you just have to duplicate and use FileHandling.java in each client and server of your solution.
Hint. As usual, there are many possible solutions and you may need to add extra classes to those mentioned above or in the model answer. Also, interface depends on your design. Indeed, to work out the solution of the questions of this coursework, it is strongly recommended to sketch a design of the application using the notation adopted in this module (see notes) and casting into a Java implementation.
Such design is not part of the assessment and should not be submitted.
Under the hypothesis of Question 1, write
It is not required to return the final file obtained generated MergingService to the client.
To test your solution, deploy it on a single physical machine and use this java.policy:
grant { permission java.net.SocketPermission "*:1024-65535", "connect,accept"; permission java.net.SocketPermission "*:80", "connect"; };
The following idiosyncrasies of Java must be taken into account to test you code:
Hint. To answer this question you can use and modify the classes in code.tgz. Depending on your design, the actual changes are minimal and should not affect the business logic of the code using POV-Ray.
Warning When organising the files in the folder question2/ you must have a subdirectory for one client (only) and one for each server of your solution; such subdirectories contain on turn two further directories named public_html and home. The subdirectory public_html plays the role of public_html on the slides explaining the deployment of RMI applications, while the subdirectory home is meant to represent the home directory of the programmer of each part of the application. An example of a typical structure is See image.
For each server myServer of your solution, create a directory structure as the one below See image.
and organise your files so that