httppoohpolyasueduSer321AssignsAssign6assign6downhtml I am l
http://pooh.poly.asu.edu/Ser321/Assigns/Assign6/assign6-down.html
I am looking for a solution to an assignment that is similar to the link listed above.
In this assignment, there are two objectives.
You should create a Java threaded socket server for downloading movie files (.mp4 for the Movie Library application.
You should create a Java Swing UI controller class that supports user browsing of the Movie Library with similar functionality as provided in the prior assignment with C++ client. This UI will also have the ability to play the downloaded video files by connecting to the download server described above, and additionally be able to request that the server add new movie descriptions to the library.
This assignment adds movie media file download for the Movie Library. This allows the Java client to play movie files as well as browse and manipulate the movie library. Whenever videos are added to the library, the movie media should be stored (filename is a property of a Media Description) on the server so it can be downloaded from the server to clients for playback. You do not need to provide upload capabilty from the client to the server when adding a new movie description.
In this assignment, you are to create a threaded socket download server for media (mp4) files. You will need to add functionality on both the server and client side to accomplish the download from server to the client. Both the server-side and client-side code should be threaded. That is, it should not interrupt other functionality. Further, on the server-side of downloading should be a separate program. So, you will have two programs running on the server-side (Raspberry Pi) the Movie Library server and the Download server. Each should listen on a different socket, but you can assume they will always run on the same host (Raspberry Pi).
Your Java client will be able to communicate with both servers. Your C++ client should continue to work with the Movie Library server, but you do not need to provide download and play capability for the C++ client. The media file is binary data, and once the file transfer is complete, the Java client should play the video using the existing functionality available in the Java view. See: moviePlayerWeb.jar.
When the user of the Java client requests Play for the selected movie title, the client should contact the download server to request download of the file. Your client should never store more than one video file, and your client should completely download a video media file before beginning to play the file. The downloaded file should be stored in the DataClient directory of the project directory Assign6.
The Media Application Client that you developed in C++ does not need to be modified to work with the download server. Instead, complete the Java Client so that it works with both the JsonRPC Movie Library server and with the Java download server.
The download server should provide the following features:
The download server accepts socket connections from clients on port 3030.
After establishing a client connection, the download server creates a new thread that manages communications with the connected client.
The server(thread) is capable of performing a single download of movie media file.
Download an mp4 video. The filename requested should exist in the server\'s DataServer folder, and should come from the Movie Description object which the client obtains from the Movie Library server.
After the download server completes the operation requested by the client, both the client and the download server threads completes.
Here is the functionality that should be implemented by your Java client.
Browse. The client should place all movie titles available from the server in the tree. Each title in the library should have a terminal node in the tree. When a tree terminal node is selected by the user, your client should contact the server to get the detailed information about the movie and display the information in the GUI areas provided. Your client should not save the detailed state of the server\'s library.
File/Save. It is not mandatory that you implement this function. The client requests that the server create a file (Json) copy of the current state of the library.
File/Restore. It is not mandatory that you implement this function. The client requests that the server re-initialize the library from the contents of a saved (Json) file. You may initialize your server\'s state in its constructor by reading and building from a file.
File/Tree Refresh. The client should empty the tree and re-draw it based on the current contents of the library. Since the library does not push out changes in its state to the currently connected clients, this operation allows a client to see modifications that may have been made by another client.
File/Exit. Exit the client. The server is not effected and should continue to run normally.
Movie/Remove. The client should request that the server remove the movie title that is currently displayed in the title field.
Movie/Add. The client should request that the server add a movie description to the library. Pass the movie description movie to be added as an argument of the call.
Movie/Play. You do need to implement this menu item in this assignment. To do so, your client makes a request to the download server (a separate server from the JsonRPC Movie Library server) to download the media file, after the file is saved on the client, the client plays the video.
Here are examples to use as the basis for you to construct your Java solution.
groupSerializeSocket.jar. This project contains a sample threaded socket server and client that downloads a Java serialized file and deserializes it on the client side. You may use it as the basis for your download server.
guiDemo.jar. This project contains examples of both Java Swing UI and C++ FLTK. In this assignment, you may find the e Java example of manipulating a Jtree useful for completing this assignment.
moviePlayerWeb.jar This project provides the View classes and video playback in JavaFX/Swing that can be used in completing this assignment. You will need to provide the Controller for the Java client (only) that communicates with the servers (JsonRPC Movie Library server, and Java Download server) which provide the underlying Model for the application.
You may also want to base your proxy class that connects your Java client to the Movie Library server on the Java client found in the Student Collection JsonRPC example: studentCollectionJsonRPC.jar
Build File Support
Add to the Ant build file targets to build and execute the download server. Name the targets build.downserver, and execute.downserver.
Your solution will be graded by extracting it on a Raspberry Pi and running the servers. Multiple instances of your client will be run from a VB Debian machine. Your servers and client should take command line arguments that allow the server host, JsonRPC port and DownloadServer port to be specified when they are invoked.
In grading your program, the project will be cleaned and then rebuilt. Your servers should be capable of being built and invoked on both the Raspberry Pi and Virtual Box Debian. Both your C++ client from the prior assignment, and your Java client should be buildable and runable on the Virtual Box Debian development machine.
Structure of your Solution Directory
Add a new subdirectory src/java/dserver to the directory structure from the prior assignment. Otherwise, the project structure should match the student collection JsonRPC example used as the basis for the previous assignment. Name the project directory Assign6-download. Your solution should include screen shots of your solution running on your Raspberry Pi and VirtualBox Debian. Place these in the project directory, Assign6-download, and be sure to include a readme.txt file that indicates the author of the submission, which option you\'ve selected to solve (download/play or manual TCP/IP Java Server), and special instructions for executing you solution. Grading your project will be done by extracting the jar and executing the project using Ant (build.xml) from the command-line. Do not include any media files (mp4) files in your submission. A sample provided by the grader will be placed in your DataServer folder to test your application. The sample will be a short video clip such as that provided in the example player.
What To Hand-In
You will hand-in this program by uploading a jar of the solution on Blackboard.
When extracted, your solution jar file should create the directory Assign6-download as a cleaned project folder. Create your jar file from a command line whose current working directory is Assign6\'s parent directory. Execute the command:
jar -cvf assign6myname.jar Assign6
Before you submit assign6myname.jar on Blackboard, please do the following:
Check to assure your solution conforms to the directions on this page.
Check grading criteria for this assignment:
Screen shots of Raspberry Pi running download server and your Media Library JsonRPC server (5 points).
Screen shot from VB Debian Linux machine showing invocation and sample output from running a Java client to download and play a media title (7 points).
Project cleans and builds successfully on Debian Linux. Running the Java client and servers allows demonstration of full functionality of both servers and the Java client, including adding, removing, tree-refresh, and selecting/displaying titles/descriptions, as well as download and playback of a selected movies (8 points).
Solution
The learning outcomes of this assignment are:
In this assignment, there are two objectives.
This assignment adds movie media file download for the Movie Library. This allows the Java client to play movie files as well as browse and manipulate the movie library. Whenever videos are added to the library, the movie media should be stored (filename is a property of a Media Description) on the server so it can be downloaded from the server to clients for playback. You do not need to provide upload capabilty from the client to the server when adding a new movie description.
In this assignment, you are to create a threaded socket download server for media (mp4) files. You will need to add functionality on both the server and client side to accomplish the download from server to the client. Both the server-side and client-side code should be threaded. That is, it should not interrupt other functionality. Further, on the server-side of downloading should be a separate program. So, you will have two programs running on the server-side (Raspberry Pi) the Movie Library server and the Download server. Each should listen on a different socket, but you can assume they will always run on the same host (Raspberry Pi).
Your Java client will be able to communicate with both servers. Your C++ client should continue to work with the Movie Library server, but you do not need to provide download and play capability for the C++ client. The media file is binary data, and once the file transfer is complete, the Java client should play the video using the existing functionality available in the Java view. See: moviePlayerWeb.jar.
When the user of the Java client requests Play for the selected movie title, the client should contact the download server to request download of the file. Your client should never store more than one video file, and your client should completely download a video media file before beginning to play the file. The downloaded file should be stored in the DataClient directory of the project directory Assign6.
The Media Application Client that you developed in C++ does not need to be modified to work with the download server. Instead, complete the Java Client so that it works with both the JsonRPC Movie Library server and with the Java download server.
The download server should provide the following features:
Here is the functionality that should be implemented by your Java client.
Here are examples to use as the basis for you to construct your Java solution.
Build File Support
Add to the Ant build file targets to build and execute the download server. Name the targets build.downserver, and execute.downserver.
Your solution will be graded by extracting it on a Raspberry Pi and running the servers. Multiple instances of your client will be run from a VB Debian machine. Your servers and client should take command line arguments that allow the server host, JsonRPC port and DownloadServer port to be specified when they are invoked.
In grading your program, the project will be cleaned and then rebuilt. Your servers should be capable of being built and invoked on both the Raspberry Pi and Virtual Box Debian. Both your C++ client from the prior assignment, and your Java client should be buildable and runable on the Virtual Box Debian development machine.
Structure of your Solution Directory
Add a new subdirectory src/java/dserver to the directory structure from the prior assignment. Otherwise, the project structure should match the student collection JsonRPC example used as the basis for the previous assignment. Name the project directory Assign6-download. Your solution should include screen shots of your solution running on your Raspberry Pi and VirtualBox Debian. Place these in the project directory, Assign6-download, and be sure to include a readme.txt file that indicates the author of the submission, which option you\'ve selected to solve (download/play or manual TCP/IP Java Server), and special instructions for executing you solution. Grading your project will be done by extracting the jar and executing the project using Ant (build.xml) from the command-line. Do not include any media files (mp4) files in your submission. A sample provided by the grader will be placed in your DataServer folder to test your application. The sample will be a short video clip such as that provided in the example player.



