Assignment 07: Design Goals, Tactics

Release date: Wednesday, 20.05.15 - Due date: Sunday, 31.05.15, 23:59

You can find an improved version of the ad-hoc exception tutorial from today's lecture in the repository as tutorial-exceptions-101:
https://svn.iai.uni-bonn.de/repos/IAI_Software/se/oosc2015/samplesolutions/tutorial-exceptions-101/

Task 26: Modeling Error Conditions

4 points

See slide 19 of chapter 10.

In the lecture we discussed the differences between Checked and Unchecked Exceptions. Go through the following list of conditions and decide whether this information should be represented as Checked Exception, Unchecked Exception, or as regular element of the program flow (typically return values of type boolean or of an enumeration type). Give for each decision an argument (one sentence). In case your answer depends on a context, explain which context you are assuming.

  1. The basic user interface library can not be loaded.
  2. The user decides that she doesn't want submit the order that she just set up.
  3. A method can't be called because of a memory malfunction.
  4. While sending a large file to a remote server the transfer system reports that it can't complete the file transfer.
  5. The maintainer wants to connect to the cloud BAKERY 2100 via Bluetooth, but he turned off the Bluetooth capability previously.
  6. File can not be opened because no file with the given file name is found at the specified location.
  7. The connection from the cloud BAKERY 2100 client to the server is lost during communication.
  8. File can not be opened for write access because another user has locked it for write access.

Task 27: Availability of the cloud BAKERY 2100 Finder

4+5 points

Slides 10 - 13, 21 - 25 of chapter 10.

After our discussion in Task 22 in the last assignment we decided to develop the component that allows to find cloud BAKERY 2100's nearby as a server component. The component gives a list of the 5 closest cloud BAKERYs if you pass the GPS coordinates as parameters. In the following you will discuss the availability of this component.

a) In the lecture we discussed two strategies to detect whether a component is available or not. Describe each in one or two sentences. Discuss which one is appropriate here. (2-4 sentences should be enough. Of course you can use as well the predefined format from the recent tasks.)

b) We mentioned the following tactics to handle failures. Discuss which one is appropriate here. (2-3 sentences per tactic should be enough. Of course the predefined format from the recent tasks could be especially helpful here as well.)

  1. Client-sided switch to alternative component
  2. Active Redundancy, Bridge
  3. Active Redundancy, Voting
  4. Handling failure of non-redundant components

Task 28: Availability of the cloud BAKERY 2100 Finder, Error Handling

6 points

Based on task 27, previous lectures and some creativity.

Finally we describe one error handling strategy in detail.

Assume that due to cost restrictions

  1. it will NOT be possible to have redundant components.
  2. the server might be unavailable three days a month on average.

We decided to deploy a list of cloud BAKERYs by PLZ (Postal Code) on the mobile device. In case the mobile device is not able to get the list of closest cloud BAKERY, it will offer to find it by PLZ based on this local list.

Draw a sequence diagram that illustrates the case of a failure and how it will be handled by the mobile device.

The sequence diagram should contain at least

  • one or a few objects as part of the client,
  • the stub representing the server object on the client,
  • the server object, and
  • one or more objects representing the middleware framework.

(You might want to have a look at the slide 20 of chapter 9).


Task 29: Some more cloud BAKERY 2100 programming (optional)

[6+6 points]

a) Connect the cloud BAKERY 2100 station to the server.

Your task:

Check out the projects from the samplesolutions folder:

  • CloudBakery2100Authentication
  • CloudBakery2100Customer
  • CloudBakery2100OrderModel
  • CloudBakery2100Pay
  • CloudBakery2100Server
  • CloudBakery2100ServerInterface
  • CloudBakery2100StationModel

plus the project:

  • A07T29_CloudBakery2100Station from your repository

This version of the cloud BAKERY 2100 is already mostly distributed. That is easy to check:

  • Start the server: CloudBakery2100Server in the CloudBakery2100Server project. It has no UI but writes a line to the console.
  • Start the customer client: CloudBakery2100CustomerClient in the CloudBakery2100Customer project.
  • Start the station client: CloudBakery2100Station in the A07T29_CloudBakery2100Station project.

CloudBakery2100CustomerClient won't show anything else than the login view without the server.1) If you look into the source code, you see as well that the list of baked goods now comes from the server. The CloudBakery2100Station is not yet connected to the server.

Your task is simply to study how the CustomerClient connects to the server and to let the Station connect with the server as well. Implement the methods register, unregister, getPlacedOrders in the StationApplication.

That's it!

b) We created quite some code for the “cloud BAKERY 2100”. We tried to stay close to our models and respect the things that the lecture is teaching. Review the implementation with all your knowledge about Requirements Engineering and System Design. List up to six aspects of the implementation and discuss whether the implementation is as it should be or whether we need to improve it. (2-3 sentences plus clear indications to what part of the code you refer).


1) BTW we have currently two users hard coded: “Hungry Harry” with “fresh food” and “Appetite April” with “get me in”.
Last modified: 2017/08/31 01:10
 
*