SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Assignment 07: Design Goals, Tactics

Release date: Wednesday, 21.05.14 - Due date: Sunday, 25.05.14, 23:59


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 connection from the cloud BAKERY 2100 client to the server is lost during communication.
  2. The user decides that he doesn't want submit an order that he just set up.
  3. The maintainer wants to connect to the cloud BAKERY 2100 via Bluetooth, but he turned off the Bluetooth capability previously.
  4. The component that provides the basic user interface functionality can not be loaded.
  5. A variable can't be read because of a memory malfunction.
  6. While saving the content of a large file the file system reports that it can't complete the write process.
  7. File can not be opened because no file with the given file name is found at the specified location.
  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.

<experiment> optional even within the optional task:

  • Would you like to participate in a little experiment?
    • Here is what you give:
      • A few extra minutes for installing the plugin and submitting
      • A detailed log of the state of your files while you have been programming.
      • The consent that Christian, Stefan, Nail (the diploma student), Daniel may review this data.
    • Here is what you get:
      • Feedback about your programming flow.
      • The chance to win a cute little present.
      • The good feeling of having contributed to the research of a fellow student.
  • Follow the installation instructions in the manual.
    Short version: Install git + drop the plugin into your eclipse/plugins folder.
  • After creating the Java Project for the DOM implementation, start the “Git Automatic Saver” as described in the manual.

</experiment>

Your task: (You don't need to take part in the experiment, but you would be very welcome to do so.)

Check out the projects from the samplesolutions folder:

  • CloudBakery2100
  • CloudBakery2100Authentication
  • 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 CloudBakery2100 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!

<experiment> If you help us with the experiment, please do finally the following:

  • After you are done with your task, submit the git repository created in your Java Project together with the rest of your code.

</experiment>

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: “test1” with “pw1” and “test2” with “pw2”.
teaching/lectures/oosc/2014/assignment_07.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024