Object/relational mapping is the Vietnam of Computer Science. – T. Neward (The Vietnam of Computer Science, June 6, 2006; see also Object-Relational Mapping is the Vietnam of Computer Science, J. Atwood, June 26, 2006)

I am getting frustrated by the number of people calling any HTTP-based interface a REST API. Today’s example is the SocialSite REST API. That is RPC. It screams RPC. There is so much coupling on display that it should be given an X rating. – R.T. Fielding, Untangled, 2010.

In this lab, you’ll build a web-based data service.

Building a Data Service

Azure supports NodeJS applications that implement data services.

Exercise 9.1

Using the Monopoly data service as a model, create a data service for your own monopoly database (from labs 7 & 8) and deploy it on Azure.

  1. Push your service code to a new GitHub repo. This is a stand-alone repo, not your standard cs262 repo.

  2. Do the following in Azure:
    1. In the list of App Services, Create a new “Web App”.
    2. Under Basics, use your free student account (created in the guide exercises); create a resource group; give the service a unique name; choose a Node-based stack; set a free pricing plan.
    3. Use the defaults for everything else and Review + create the app. (N.b., the creation wizard doesn’t allow you to configure GitHub for a free pricing app; you’ll set this below.)

  3. In the new app service, do the following:
    1. Under Deployment CenterSettings: Enable GitHub deployment; enter your GitHub service repo details.
    2. Under ConfigurationApplication Settings and add separate key-value pairs for your ElephantSQL database: DB_SERVER (something like salt.db.elephantsql.com); DB_PORT (5432); DB_USER; & DB_PASSWORD). See your ElephantSQL account for the appropriate values. Note that this approach allows us to keep these values out of our (public) GitHub repo. Also, add a key-value pair for NODE_ENV : production.

See the README file for details. Update that README.md file to link your service URL, which should provide endpoints that match the following:

For grading purposes, push the following into a cs262/lab09 sub-directory in your standard course repo:

If you get server errors, go to the Web service and check the execution log. Do this by logging into your service and go to your app. E.g., for Azure, look under the Overview (tab on the top) → Logs (tab in the middle).

Team Work

Running a Sprint Retrospective and Planning Session

Be sure to consider your preliminary design presentation as part of this planning exercise.

Exercise 9.2

You should actively participate in your team’s retrospective and planning session.

Checking in