Skip to content

Latest commit

 

History

History
134 lines (86 loc) · 10.2 KB

coursework.asciidoc

File metadata and controls

134 lines (86 loc) · 10.2 KB

CSC8104: Enterprise Middleware Coursework, November 2013

Outline

This coursework is designed to give you experience with building Java EE 6 applications and deploying them to the Cloud. In part one you will build a service with a web front end, hosted on a Platform as a Service Cloud. In part two you will create a more complex service by orchestrating your colleagues' services into a bigger application.

You must complete the provided Tutorial before attempting this coursework. There are a number of prerequisite steps in the tutorial that must be done for the coursework to work.

Technologies

This coursework covers a large number of technologies. The challenge here is to learn the right bits of each technology in order to complete the coursework.

  • Angular.js. This is the technology you will use for the web-interface to your application.

  • Java EE 6. Java Enterprise Edition is the technology you will use to develop the server-side part of your application.

  • JPA. Java Persistence API provides a Java API onto your application’s data.

  • Bean Validation. This technology allows you to specify constraints on your data and assists with validation.

  • Arquillian. With this tool you will be able to write tests that run inside the application server.

  • Maven. Your application will be built and deployed with this tool.

  • EJB Session beans. TODO

  • Openshift. This is the Platform as a Service (PaaS) that you will use to deploy your application to the Cloud.

  • REST. This technology will be used for communication between your web interface (running in the web browser) and your service (running in the Cloud).

  • Git. This is a distributed version control system and will be used to backup your code and for deploying it to OpenShift.

Project Specification

Important
You must write all the elements of the coursework yourself. You must NOT use tools/wizards (such as Eclipse) to write them for you! However, you are encouraged to use Eclipse as your IDE.

For this project you must create a Maven build for your application. You must also produce Arquillian tests for testing your application; these tests must also run from Maven. At the end of the project you will submit to NESS a zip file containing the source code and Maven build scripts. We will use this zip file to test your submission, so it should contain everything necessary to build and test your project.

Tip
You will be awarded a considerable number of marks for your distribution and use of version control.

You should push commits of your coursework regularly to your GitHub repo. It is a good idea to do so every time you get a small piece of functionality working. This ensures that you can move back to a working state if you get in a mess. It also ensures that you have a backup and that the demonstrators can view your code and track progress.

Important
You will receive marks for your use of GitHub. We expect to see a steady flow of logical commits over the coursework period.

General Processs

You should build on kitchensink example from the tutorial. You do not have time to create this application from scratch. Don’t worry about renaming the packages or the OpenShift application name, doing so is likely to get you into a mess.

The easiest way to work, is to deploy your application to a local version of JBoss during development. Push your code to OpenShift periodically, when you have a new set of features working. This is especially important for part 2, as you will cause your colleagues problems if your service becomes unavailable.

Part 1

Produce a web site selling ONE of the services from the following list. Your website must be developed using HTML5 and Angular.js technologies. You should now be familiar with these technologies after completing the provided tutorial.

  • Taxi

  • Flight

  • Hotel

Important
You have been allocated a service to implement. See the allocation list in the tutorial document for details. You MUST implement the service that you have been allocated.

The following diagram shows the architecture you will need to implement for your application:

Part 1 architechture diagram

  • Web-site. This is implemented with HTML5 and Angular.js. The code here is responsible for providing the user-interface and runs entirely in the user’s web browser. It communicates with your server in the Cloud (or locally during development) when invoking operations, such as making a booking or listing users. This is done using…​

  • REST Services. These are implemented using JAX-RS and provide a service interface to your application. These services are responsible for managing bookings, users and taxis/hotels/flights.

  • Persistence layer. This layer provides a Java interface for accessing the data in the database, using the Java Persistence API (JPA).

  • Database. This is where your data is stored. Your application won’t access this directly as it will use JPA to interface with the data.

Web-site

Your web-site should provide an interface to:

  1. Create & List customers

  2. Create & List items (taxis, rooms or flights)

  3. Create, Cancel & list bookings

Important
You will be marked purely on how well your site works. No marks will be given for how the site looks.

REST Services

You will need three REST services:

  1. Customer. Lists and creates customers.

  2. Taxi/Hotel/Flight. Lists and creates items.

  3. Booking. Creates and cancels bookings.

Persistence Layer

You will probably need three Entity Beans.

  1. Customer. A bean to hold the data you wish to collect about each customer.

  2. Taxi/Flight/Hotel. A bean to hold the data you wish to collect about each item you have available for booking.

  3. Booking. A bean representing the booking and linking to the customer who made the booking and to the item being booked.

Tip
Keep these entities simple. Just provide the minimum information required to fullfil the requirements.

Report Hints

  • Describe the composition of your service, including each of the JAX-RS services and how they interact. You might like to draw a diagram like the one above to help explain your architecture.

Part 2

You will now need to integrate three services into a simple travel agent application; which you will update your web site to support. You will use your own service and two other services provided by your colleagues. The services you need to integrate are:

  • 1 x Hotel service

  • 1 x Taxi services

  • 1 x Flight service

You must ensure that either every part of a booking is made, or no parts of the booking are made. Remember, each part of the booking can be cancelled using the provided cancel operation. For example, the user would not want to book a flight, if they didn’t have somewhere to stay at the destination. You should provide a mechanism that allows a booking to fail. For example, you could fail a booking if the date is too far in the future. This will allow you to easily control which booking fails and which succeeds. You should then be able to set up a scenario where the first two bookings succeed and the remaining booking fails. Your web application should detect this failure and cancel the previous bookings that succeeded.

Important
It is very important that the user does not end up with a partial booking. Otherwise they may end up paying for a flight, without having a hotel to stay in.

Part 2 architechture diagram

The diagram above shows the type of interaction that you should have achieved by completing part 2.

Tip
You may find that you are ready to use your colleagues’ services before they are ready to make them available. If this happens then you can temporarily use your own service three times and then switch to your colleagues’ services when they become available.
Tip
You may also find it hard to utilize the exact service types specified above, due to the progress of your colleagues. In this case you may duplicate the service types; for example, two Taxi services and one Flight service. However, you must make sure that the two services you select are offered by two different colleagues!

Report Hints

  • What problems did you have utilising your colleagues’ services? How would these problems be exacerbated had the producers of these services not been in the same room?

  • What problems did you have offering your service to your colleagues?

Part 3

TODO: What should we put here? Maybe drop this part for this year? Discuss Ideas after Ellis has gone through the coursework.

Submission Guidelines

Demonstration

Prior to submission you will provide a 10-15 minute demonstration to one of the Course Demonstrators. You will be expected to describe your technical solution and discuss your personal experiences throughout the project.

A sign-up sheet for demonstration slots will be made available in the Computer clusters during the first week of practical sessions.

Coursework submission

You must submit all code via the coursework submission system (NESS). As stated above, we must be able to build and test your submission using your Maven build.

You should also submit a short report via NESS (roughly three pages) summarising the work carried out on this project, and an evaluation of how much you achieved. We are particularly interested in any assumptions you made, and how they motivated particular design decisions. You should also provide a brief discussion of your personal experience of the development process; e.g. which aspects of the project did find particularly easy/hard?

We have provided a list of things you should cover in your report in the "Report Hints" sections of this document.

Finally

Demonstrators will be available in your cluster rooms during all practical sessions. You should go and see them if you are having any difficulties. This includes understanding what you have to do.

Discussion Boards will also be available for CSC8104 in Blackboard (http://bb.ncl.ac.uk). You may post any questions about the tutorial or coursework assignment here, and the discussion boards will be monitored by Course Demonstrators. Before posting you should use the discussion boards' search facilities to see if somebody has already encountered the same problem.

Tip
If you see a question on the discussion boards you know how to answer, we strongly encourage you to assist your colleagues!