ECE 6102: Dependable Distributed Systems
Programming Assignment 1
Part 1:     Due date: Feb. 1, 2018, 11:55 PM
This part is worth 2 points out of 10 total points for the assignment.
First, sign up for a 1-year free trial on Google Cloud Platform (see https://cloud.google.com/free for details).
Next, follow the step-by-step tutorial instructions to install and run the Python Guestbook
application from the Google AppEngine documentation site:
https://cloud.google.com/appengine/docs/python/getting-started/creating-guestbook    
From this page, go through the step-by-step instructions
to get the app running and deployed in the cloud. Customize your
project by choosing a default guestbook name that is based on your
name and changing the number of messages that are displayed on the
screen.
As part of the material to be turned in, you should submit the appspot.com URL
for your Guestbook project. Make sure to include your name in the project ID
so the TA knows it is your project.
N.B. As I will discuss in class, it is best to get projects
running and debugged on your local machine (http://localhost:8080)
first before you deploy them to AppEngine. Also, note that it might take at
least 10 minutes for the indexes to be built in AppEngine after your app is
deployed before it starts working. Error messages related to indexes are
probably an indication that the indexes are still being built, as long as your
project was working fine locally.
Part 2:     Due date: Feb. 13 Feb. 15, 2018, 11:55 PM
This part is worth 8 points out of 10 total points for the assignment.
Partially working solutions will be eligible for partial credit so turn in
whatever you have working by the due date!
In this part, you will build an app to maintain the inventory for a
wine shop. The app will store information such as type (red, white,
rosé, or sparkling), country and region of origin, etc., about the
wines available in the store. The app should allow new wines to be
entered under their proper type and should have browsing and search
features. An example app with the required functionality for this
assignment can be accessed at:
https://wine-inventory-db.appspot.com
Your design does not have to mirror this example exactly but it should
include all of the relevant features described below. Feel free to play with
the example application to see how it works. However, please add only 1-2
wines to the inventory to avoid causing the project to use too much
storage.
Step 1:
The first step is simply to take the Guestbook project, rename it, and
start to modify it for wines. If you change "Guestbook name:" to "Type", you
will be able to define new types and switch among the types you have
defined. If you change "Sign Guestbook" to "Enter wine info", you will be able
to enter information about new wines and see the list of wines entered so far
within each type you have defined.
In this step, it would also be good to change the HTML form to enter
different pieces of information about a wine in separate boxes.
If you are not familiar with HTML forms
syntax and operation, consult one of the many Web tutorials on HTML
forms. Mandatory information to include, each as its own field, is:
- country of origin
- region
- variety (this is typically the grape used to produce the wine
such as cabernet sauvignon, merlot, chardonnay, etc., or "blend" if
the wine uses a mixture of grapes)
- winery name
- year
The type is defined by the data store the wine is stored in and so
that information is implicit and does not have to be stored within the
individual data item.
The search feature should allow someone to search for wines within one
type based on any combination of the above fields excluding year.
Step 2:
In this step, you will modify the application to mimic the example one listed
above. This will require request handlers for all of the various pages that
are part of the application. Most of the functionality required for the full
application can be found somewhere within the guestbook app. Much of this step
consists of modifiying parts of the guestbook code and moving the modified code
into the appropriate request handlers for the wine inventory app.
Some things to keep in mind when carrying out this step:
- Note that the different "Browse" links all go to the same URL (.../display)
but with the type name passed as a parameter to the display request
handler. For full credit, you should implement this feature in this way,
i.e. you should not
have separate URLs and separate handlers for each type. This makes the
app more extensible as additional types are added. (To be fully extensible,
the "Browse" links themselves would be created dynamically, one for each
type that has been defined. You do *not* have to implement that, however.
It is OK to have a fixed number of types (the 4 listed above at
least) and have
hard-coded "Browse" links for those types.)
- The search feature searches for part or all of a field's data within all
of the wines in the specified type. For full credit, you should implement
this feature in this way, i.e. if you enter "inot" in the "Variety"
search box under the white wine type, you should retrieve all "Pinot
Grigio" and "Pinot Gris" varieties.
To verify that your inventory app is working, enter exactly 5 wines in the
4 different types and thoroughly test all of the app functions. Your
implementation should be capable of displaying and searching at least
up to 50 wines per type.
Additional Requirements:
Here are some other miscellaneous requirements for the assignment.
Disclaimer: I believe all of these features are included in the
example project linked to above, but it has not been thoroughly tested
against this list. Do not rely on the functionality of the example when
turning in your project. Make sure to carefully go through the below list to
ensure that your project complies with all requirements.
- Error handling for inputs: Check for empty inputs when
entering a wine, searching, or setting a category name and display
an appropriate error message when an input field is left empty.
- Case sensitivity: Type names and search strings should not
be case sensitive. So, if you enter "Red" or "red" as the type,
these should direct to the same set of wines in the data store. Similarly,
"PINOT" or "pinot" should match "Pinot Grigio" in the variety search
feature.
- Returning to main page: There should be a simple way for users to
return to the main page of your repository (the one titled "Doug Blough's
Wine Inventory App" in the Python example application) without
having to use the
back button. This can be easily handled by including a clickable link that
takes the browser back to the main page on every other page of the app.
- Failed searches: If a search string is entered that does not match
any wines in the data store entries, an appropriate message should be
displayed (instead of just redisplaying the search page without any results).
- New wine categories: The "enter new wine" function should
allow users to define their own categories, beyond the four required
ones, if they wish. Your app does not need to support the browse
function for any categories other than the required four. However,
the search function should allow users to enter any category name
and search for wines in newly defined categories. Note that the
example app supports this.
Turn-in:
On T-square, turn in the following items:
- The URL for your AppEngine wine inventory app in the text box.
- An archive of your wine inventory project directories with all of your
code, configuration files, etc. (zip or tar.gz formats accepted)
- An additional submission of just the python source file/s (by
default the file named guestbook.py).
An example submission would look like:
david-cabinian.appspot.com (in the text box)
appengine-guestbook-python.zip (in submission
attachments)
guestbook.py (in submission attachments)
Again, make sure to include your name as part of the project ID that you turn
in so the TA knows the project is yours.