This preview shows page 472 - 475 out of 502 pages.
Project 12.1. Seed the staging database with 500 movies (randomly generated is fine) toRottenPotatoes. Profile its deployed performance on Heroku using New Relic. Addfragment caching around the moviepartial used by the indexview and re-profilethe app. How much improvement in responsiveness do you observe for the indexview once the cache is warmed up? Project 12.2. Continuing the previous exercise, use httperfto compare the throughput of asingle copy of your app on the indexaction with and without fragment caching.(On Heroku, by default any apps on a free account receive 1 “dyno” or one unit oftask parallelism, so requests are performed sequentially.) Project 12.3. Continuing the previous exercise, add action caching for the index view so that if nosorting or filtering options are specified, the indexaction just returns all movies.Compare the latency and throughput with and without action caching. Summarizethe results from all three exercises in a table. Upgrades and feature ﬂags:Project 12.4. Investigate the availability cost of doing an “atomic” schema update and migrationas described in Section12.4. To do this, repeat the following sequence of steps for N= 210,212,214: Seed the staging database with N randomly-generated movies with randomratings. Run a migration on the staging database that changes the ratingcolumn inthe moviestable 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 effecton availability of doing the above migration without bringing your service down. Project 12.5. In Section7.2we integrated third-party authentication into RottenPotatoes byadding an authentication provider name and a provider-specific UID to theMoviegoermodel. Now we’d like to go further and allow the same moviegoer to log in to the sameaccount with any one of several authentication providers. That is, if Alice has both aTwitter account and a Facebook account, she should be able to log in to the sameRottenPotatoes account with either ID. Describe the changes to existing models and tables that are necessary tosupport this scheme. Describe a sequence of deployments and migrations that make use of featureﬂags to implement the new scheme without any application downtime.Security:
Project 12.6. Wired Magazine’s ThreatLevel column for July 2012reported that453,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’sservers 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 pioneeringmany of the ideas at the root of contemporary object-oriented programminglanguages. He led the team that developed the Smalltalk language, from whichRuby inherits its approach to object-orientation. He also invented the “Dynabook”