Project 121 seed the staging database with 500 movies

This preview shows page 472 - 475 out of 502 pages.

Project 12.1. Seed the staging database with 500 movies (randomly generated is fine) to RottenPotatoes. Profile its deployed performance on Heroku using New Relic. Add fragment caching around the movie partial used by the index view and re-profile the app. How much improvement in responsiveness do you observe for the index view once the cache is warmed up? Project 12.2. Continuing the previous exercise, use httperf to compare the throughput of a single copy of your app on the index action with and without fragment caching. (On Heroku, by default any apps on a free account receive 1 “dyno” or one unit of task parallelism, so requests are performed sequentially.) Project 12.3. Continuing the previous exercise, add action caching for the index view so that if no sorting or filtering options are specified, the index action just returns all movies. Compare the latency and throughput with and without action caching. Summarize the results from all three exercises in a table. Upgrades and feature flags: Project 12.4. Investigate the availability cost of doing an “atomic” schema update and migration as described in Section 12.4 . To do this, repeat the following sequence of steps for N = 2 10 ,2 12 ,2 14 : Seed the staging database with N randomly-generated movies with random ratings. Run a migration on the staging database that changes the rating column in the movies table from a string to an integer (1=G, 2=PG, and so on). Note the time reported by rake db:migrate . Suppose your uptime target was 99.9% over any 30-day window. Quantify the effect on availability of doing the above migration without bringing your service down. Project 12.5. In Section 7.2 we integrated third-party authentication into RottenPotatoes by adding an authentication provider name and a provider-specific UID to the Moviegoer model. Now we’d like to go further and allow the same moviegoer to log in to the same account with any one of several authentication providers. That is, if Alice has both a Twitter account and a Facebook account, she should be able to log in to the same RottenPotatoes account with either ID. Describe the changes to existing models and tables that are necessary to support this scheme. Describe a sequence of deployments and migrations that make use of feature flags to implement the new scheme without any application downtime. Security:
Project 12.6. Wired Magazine’s ThreatLevel column for July 2012 reported that 453,000 passwords for Yahoo! Voice users were stolen by hackers. The hackers said, in a note posted online, that the passwords were stored in cleartext on Yahoo’s servers and that they used a SQL injection attack to gather them. Discuss. Project 12.7. TBD: exercise about compromising the browser binary Project 12.8. TBD: exercise about why it’s hard for a new CA to go into business
Alan Kay (1940–) received the 2003 Turing Award for pioneering many of the ideas at the root of contemporary object-oriented programming languages. He led the team that developed the Smalltalk language, from which Ruby inherits its approach to object-orientation. He also invented the “Dynabook”

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture