Comp150CPA: Clouds and Power-Aware Computing
Quiz 1 Answers -- Mar 2, 2011
Closed book and notes

Name: ____________________________ login: ______________

Please write all of your answers on this sheet. No books, notes, or electronic devices are allowed.

  1. (40 points) Please fill in the blanks to create correct statements.


    The ability of a cloud to respond to unforeseen changes in load is called ____elasticity____. The reason that this response must be dynamic is that unneeded cloud resources consume ____power/server instances____ and could be used by other applications.


    In AppEngine, to hide cloud latency from the customer, a synchronous server-side data access routine is paired with a(n) ____asynchronous____ client-side interface. Server-side routines deal with ____persistent____ data, which client-side routines should not do.


    Eventual consistency is useful when using the cloud to store ____logs/history/warehouse data____, while strong consistency is required when one is using the cloud to store ____transactions(e.g., purchases)____.


    A Service Level Objective (SLO) determines what constitutes ____desired____ behavior for a service, while a Service Level Agreement (SLA) determines ____penalties____ for not meeting objectives.
  2. (10 points) Explain briefly why it is difficult to directly relate load average on a server with its response time to queries.

    Answer: Load is related to the structure of code, and how many cloud queries are made to accomplish a request. Thus the relationship depends on how the service is written, and not just on the machine on which the service is running.
  3. (10 points) Explain briefly what behavior results from combining flowless switching with eventual consistency.

    Answer: It is possible for a transaction to fail to be reflected in the user's view immediately after it is made, i.e., it is possible that a purchase the user just made will not appear in her purchase record.
  4. (10 points) Explain briefly what happens to service behavior when one triples the number of (edge) servers that provide a service.

    Answer: The available throughput for optimal response time triples. The response time does not change unless the original servers are near processing limits.
  5. (15 points) In assignment 2, a few groups reported that it was necessary to detach a persistent object from its persistence store, change it, and then make it persistent again in order to change its contents. Otherwise, changes were ignored. Why did they have to do this?

    Answer: While this can happen from mis-programming persistent objects, e.g., by allowing unmonitored changes to persistent variables from outside the class, it can even happen if all of the persistent variables are private.

    The reason for this is that persistence annotations only apply to primitive objects, and not collections like lists and maps. The latter can be changed in the local instance without automatically changing the distributed copy. Detaching, changing, and then reattaching such an object does change it in the persistent store.

    Persistent annotations for functions that modify list structure are particularly problematic; the persistence factory doesn't know what to do with, e.g., list.add(thing). So, among other things, one must avoid using collections as persistent variables to avoid this problem.

  6. (15 points) In AppEngine, what conditions are there upon a data type that will be forwarded to the client as the result of a service request, and why?

    Answer: The data type must be serializable, i.e., able to be stored in a string and then retrieved. One also cannot use persistent objects; there is no concept of persistence on the client side.