====== Lab 04: Storage as a Service and NoSQL ====== //By: Laureline David & Michael Rohrer// ==== PEDAGOGICAL OBJECTIVES ==== Deploy a simple e-commerce application on Google App Engine and Google Datastore Implement transactions on the datastore write operations Examine what happens when two or more users want to change the same data at the same time (concurrent access) ==== TASKS ==== In this lab you will perform a number of tasks and document your progress in a lab report. Each task specifies one or more deliverables to be produced. Collect all the deliverables in your lab report. Give the lab report a structure that mimics the structure of this document. ===== Task 2 - Get faminiar with the example code ===== ==== List the URL paths that appear in the deployment descriptor web.xml and the Servlets that handle them. ==== ^ URL ^ Servlet Name ^ | /product | ProductServlet | | /item | ItemServlet | | /customer | CustomerServlet | | /order | OrderServlet | ==== What is the servlet BaseServlet used for? ==== ''BaseServlet'' sets up the ''Content-Type'' and ''Cache-Control'' headers. ==== Reading and writing data is delegated to another class of the application. Which one? ==== ''CustomerServlet'' uses the ''Customer'' class. ==== This class in turn delegates reading and writing to an ultimate class. Which one? ==== ''Customer'' class uses the ''Utils'' class. ===== Task 3 - Complete the example code with transactions ===== ==== Does the application detect or prevent logical conflicts between two users? ==== No, since the implemented transaction block only prevents from concurrency errors (such as two threads performing a concurrent write). The edit form is not protected by a transaction (much harder to implement) and does not prevent edit conflicts.