Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS402FZ Assignments

There is a pdf document on Moodle “General Software Installation for running CS402FZ code examples” in the COURSEWORK MATERIALS section, which explains how to install components in Eclipse for most aspects of coding that we have covered or will cover later in  the course and which may also be useful for some of these assignments. There are code examples from the lecture slides which can be found in the Code Examples zip file in the COURSEWORK MATERIALS section as well.

I have made zip archives of all the software needed (I think) available to you on Moodle so you shouldn’t need to go searching for anything when running code shown in class but you can use Maven or Gradle managed builds or download these artefacts from the web if you prefer! So take a look at it and it may help bootstrap and accelerate the development of several of these assignments and also allow you test some of the communication and parallel/concurrent programming ideas (covered in class in the second half of term) later if you wish.

These are the CS402FZ assignments, each worth 20 marks. You need to do any two from the choice of seven assignments below for full marks in continuous assessment (CA). Maximum CA mark for these assignments is 40% of the module mark. All assignments are due at the end of the last week of this module. Late submissions till the end of 9th week will get 10% penalty, and later than that will have higher penalty applied.

All the assignments are relatively straightforward and should not take too long to complete given many are modifications of the demonstration instructions. The idea is to give you an opportunity to develop a deeper familiarity with some of these topics and experiment with your own code.

Whatever ones you choose, please try to understand the topic and do the work yourself. There is nothing wrong with helping each other out with understanding or problems in completing  these assignments, but you must be honest and make your own unique attempt. Any blatant   copying or production of the same or virtually identical code without evidence of your own   input and understanding may result in poor marks.

Assignment 1

There are three simple examples demonstrating how to make an XML based Web Service on Moodle which you can bring into your Eclipse environment and try out. There is also a pdf  document in the “Example Java XML Web Services with Eclipse and Tomcat” folder that   explains the process of how to create an XML SOAP Web Service in Eclipse which uses one of these examples and you can apply the method to getting the others two projects running as well, or you can find other tutorials online.

Create your own Java XML based Web Service running on Apache with CXF and then create your own Java test client (not an auto generated one) to demonstrate it. It doesn’t have to be  complex but should be different to the example Web Services given.

SUBMIT:

A zip file containing the Java code for your service and client (the code you wrote yourself only not auto generated code) and the WSDL file describing the service (which is generated automatically by Eclipse and stored in the project’s WebContent\wsdl directory   when the web service is published). Your root folder for your code should be named as your MU student number (e.g., 19xxxxxx), and your code needs to be easy to follow with comments.

A pdf file including follows:

•   a description of your Web Service (with 1-2 paragraphs),

•   a step-by-step instruction like “General Software Installation for running CS402 code examples” . The idea is that by following your instruction in a different computer, a    person should be able to run your code,

•   screenshots of running your code and the client output running in Eclipse. Add a one-

line caption/annotation/description about each screenshot (e.g., client output).  NOTE: Name your zip file and pdf file as your MU student number, e.g., 19xxxxxx.zip.

Assignment 2

There are three simple examples demonstrating how to make a RESTful Web Service on Moodle using Jersey which you can bring into your Eclipse environment and try out. There is also a pdf document in the Example RESTful WebServices with Eclipse Jersey JAX-RS”   folder that explains the process of how to create a RESTful Web Service in Eclipse which     uses one of these examples and you can apply the method to getting the others two projects   running as well, or you can find other tutorials online.

Create your own RESTful Web Service running on Apache with CXF and then create your    own Java test client (not an auto generated one) to demonstrate the PUT and GET operations to your webservice. The more innovative the idea, the more marks may be awarded, it doesn’t have to be complex but should be different to the example Web Services given. You should   also create an index.html file which describes the API and allows the GET methods to be tested from an internet browser.

SUBMIT:

A zip file containing the Java code for your service and client (the code you wrote yourself only – not auto generated code) and the index.html file describing the service is used as a landing page and is stored in the project’s WebContent directory when the web service is published. Your root folder for your code should be named as your MU student number (e.g., 19xxxxxx), and your code needs to be easy to follow with comments.

A pdf file including follows:

•   a description of your Web Service with 1-2 paragraphs,

•   a step-by-step instruction like “General Software Installation for running CS402 code examples” . The idea is that by following your instruction in a different computer, a    person should be able to run your code,

•   screenshots of running your code and the client output running in Eclipse. Add a one- line caption/annotation/description about each screenshot (e.g., client output).

NOTE: Name your zip file and pdf file as your MU student number, e.g., 19xxxxxx.zip.

Assignment 3

Create a simple Java based gRPC Client and Server application using Protocol Buffers. This will require first installing the Protocol Buffer Compiler and protobuf-java JAR and the        gRPC implementation as described in the “General Software Installation for running CS402 code examples”, pages 9- 17. All software required should be available on Moodle or the web for latest versions.  Follow the installation notes in the Moodle document which                    demonstrates a simple gRPC service (code is in the “Example Simple gRPC Server” folder) but the service you implement should be different to that example, perhaps demonstrating a  streaming or bidirectional feature of gRPC or a composition of two microservices would be  great.

SUBMIT:

A zip file containing the Java Code for the Client and the Java Code for the Server that you   wrote yourself only (not auto generated code). Your root folder for your code should be named as your MU student number (e.g., 19xxxxxx), and your code needs to be easy to follow with       comments.

A pdf file including follows:

•   a description of your application with 1-2 paragraphs,

•   a step-by-step instruction like General Software Installation for running CS402 code examples” . The idea is that by following your instruction in a different computer, a    person should be able to run your code.

•   screenshots of running your code and the output generated during an interaction      between them. Add a one-line caption/annotation/description about each screenshot (e.g., client output).

NOTE: Name your zip file and pdf file as your MU student number, e.g., 19xxxxxx.zip.

Assignment 4

Implement a simple chat client which transmits user text messages entered at the keyboard to a multicast address and also can simultaneously receive messages sent from other clients on other machines sent to the same multicast address. The chat client should initially ask for a   user name and prepend that username to all outgoing multicasts so users can see who the      messages are from.

When implementing the chat client, as a minimum, you will need to implement the           transmitter code and the listener code as separate threads so that live messages from    other sources may be received and displayed while the user is also typing a new message to be sent. There is no need for a server, implementations should not use a server. This is a  standalone application which can talk with other standalone instances of it.

The basic components of the code for doing the transmitter multicast and receiver in Java are given in the lecture notes on the topic of multicast communication and available in the “IP    Multicast” folder.

SUBMIT:

A zip file containing the Java code for your chat client. Open several command prompts in   windows and launch the Java chat client in each. Your root folder for your code should be      named as your MU student number (e.g., 19xxxxxx), and your code needs to be easy to follow with comments.

A pdf file including follows:

•   a step-by-step instruction like “General Software Installation for running CS402 code examples” . The idea is that by following your instruction in a different computer, a    person should be able to run your code.

•   screenshots of running your code including a sample interaction between the instances of the chat clients and

•   a description of with 1-2 paragraphs regarding the interaction. Add a one-line caption/annotation/description about each screenshot.

NOTE: Name your zip file and pdf file as your MU student number.

Assignment 5

Create a Java socket based client-server style application where the server implements an executor service with a threadpool for executing incoming requests. The processing work done by the server is up to you, with more marks going for innovation. The server should print out details of incoming client connections as well as returning results to the clients.

We have not covered thread pools in lectures yet but you could build this as a single threaded server first and then alter the server code later to operate using a threadpool when we get to  that topic shortly in the second half of term.

SUBMIT:

A zip file containing the Java code of your server and example client. Your root folder for your code should be named as your MU student number (e.g., 19xxxxxx), and your code needs to be easy to follow with comments.

A pdf file including:

•   a description of your application with 1-2 paragraphs,

•   a step-by-step instruction like General Software Installation for running CS402 code examples” . The idea is that by following your instruction in a different computer, a person should be able to run your code.

•   screenshots  of running  your  code  including  an  example  interaction between them. Add a one-line caption/annotation/description about each screenshot.

NOTE: Name your zip file and pdf file as your MU student number.

Assignment 6

Implement a program that can communicate a HTTP GET request to a web server of your    choice (entered at runtime) to retrieve and save all the elements in the landing page. The root document will need to be parsed for additional embeded hypertext URLs and fetch and save each of those in separate files.

The Apache HttpComponents packages provide a toolset of low level Java components      focused on HTTP protocol processing for anyone building HTTP-aware client and server  Java applications such as web browsers, web spiders, HTTP proxies, web service transport libraries, or systems that leverage or extend the HTTP protocol for distributed                    communication. A small piece of code which used these tools was included in the slides on the HTTP protocol in lectures.

The components can be downloaded from https://hc.apache.org/, drag them into Eclipse and add to the build path to use them in applications.

You can use any other language or HTTP toolset package other than Java instead if you wish.

SUBMIT:

A zip file containing the code of your web fetch program. Your root folder for your code        should be named as your MU student number (e.g., 19xxxxxx), and your code needs to be easy to follow with comments.

A pdf file including:

•   a description of your application with 1-2 paragraphs,

•   a step-by-step instruction like General Software Installation for running CS402 code examples” . The idea is that by following your instruction in a different computer, a    person should be able to run your code.

•   screenshots of running your code including a screenshot of the directory showing the URL items that were stored after the fetch along with the URL used. Add a one-line

caption/annotation/description about each screenshot.

NOTE: Name your zip file and pdf file as your MU student number.

Assignment 7

The following REST API URL returns an XML document containing realtime information about Train Times (current params in the URL specify from Enfield Station with a 90min

look ahead period).

http://api.irishrail.ie/realtime/realtime.asmx/getStationDataByCodeXML_WithNumMins?Sta tionCode=ENFLD&NumMins=90&format=xml

Write a program that can fetch this realtime XML feed for your chosen stop, parses it and displays the train times in a more readable tabular form (in a HTML page perhaps) with   Expected Arrival Time, Origin, Destination, Expected Departure Time, Arrival Time at   Destination.

Other station names can be found herehttp://api.irishrail.ie/realtime/

Use XML document processing tools in Eclipse or some other environment to make this straightforward and short to implement.

Note the realtime bus information for Ireland now uses GTFS feed formats and is no longer   available as an XML feed. You are welcome to modify this assignment and base it on the use of a GTFS feed if you wish to present bus routes. You need to register with the national         transport authorityhttps://developer.nationaltransport.ie/to get a key to access their API. This would be more complicated than the train feed.

SUBMIT:

A zip file containing your code and your root folder for your code should be named as your      MU student number (e.g., 19xxxxxx), and your code needs to be easy to follow with comments.

A pdf file including:

•   a description of your application with 1-2 paragraphs,

•   a step-by-step instruction like General Software Installation for running CS402 code examples” . The idea is that by following your instruction in a different computer, a    person should be able to run your code.

•   screenshots of running your code including a sample screenshot of the output. Add a one-line caption/annotation/description about each screenshot.

NOTE: Name your zip file and pdf file as your MU student number.