Comp150CPA: Clouds and Power-Aware Computing
Quiz 2 Answers -- April 27, 2011 -- Closed book

name: ____________________________ login: ______________

  1. (20 points) Explain why an arbitrarily chosen key/value distributed hash table is not automatically suitable for running Map/Reduce algorithms.
    Answer: The main reason is that DHT's are optimized for single fetches, and M/R requires collection and aggregation. One can either optimize one's speed for single object fetches, or optimize for collection of objects, and these require different design decisions.
  2. (20 points) Draw a BPMN diagram for the following situation: a customer buys a scooter from, which asks a credit-card company to verify credit-card information, after which it either voids the sale (if the credit card is not good) or ships the scooter (if the sale is authorized).
    Answer: an absolutely correct diagram is this one.

    (Click to enlarge). It uses an event-based gateway to receive the rejection, and a data-based gateway to send it, which is realistic. I will accept anything close.
  3. (20 points) Employees at a company work 35 hour weeks for a total cost to the company of $100,000 a year each. Company sales average $1000/hour on average during a regular work day. Based upon this, what is the cost of an hour of downtime during working hours?
    Answer: Let x be the number of employees. Then the cost of downtime = work lost + revenue lost = $100,000*x/52/35 + $1000. Each employee costs $100,000 (including benefits and social security/RRTA) so that x employees cost $100,000x per year. There are 52 weeks in a year, and 35 hours in a week, so the running cost per hour is $100,000/52/35.
  4. (40 points) Please fill in the blanks:
    1. Part of BPMN can be converted to BPEL by ____documenting or explaining____ the nature of communications between processes. Unlike BPEL, however, BPMN also documents the behavior of ____personell/employee____ elements of the business, which cannot be documented in like manner.
    2. The reason that BPEL (and BPMN) are written in XML is not because that is a human-friendly language, but rather, because XML has pre-existing mechanisms for defining the ____types____ of XML fragments (using XSchemas) and for ____querying____ XML documents for desired keywords (using XPATH).
    3. A complexType in an Xschema describes an XML element that contains ____other sub-elements____. An Xschema restriction facet makes a text type match ____less (instances)____ than its base string type.
    4. The reason that Xschemas are used in implementing SOAP services is to ____guard/protect____ against invalid data being used as a SOAP query. This means that the code that implements the service will ____execute/respond____ only if input matches.