Monday, March 28, 2011

HW10: Refactoring and Memcache

For this homework you will be cleaning up the existing codebase and implementing one small new feature. The new feature is the memcaching of an question. In the use-case where a teacher posts a survey question we expect up to hundreds of hits on that question in a short amount of time. Since they are all seeing the exact same question it seems like a perfect time to use a memory cache, so you will. The parts of this homework are below:

  1. You will first clean up your web app of all the cruft it has accumulated. This includes:
    1. Eliminating all links to any specific homeworks (hw6, hw7...)
    2. Making sure there are no dead links or links that cause your app to crash.
    3. Make sure that after creating a question the user is taken to that question's page.
    4. Adding all the needed navigation links so the user can move easily move around.
    5. We can see all the questions of a user.
    6. The app is simple to use.
  2. Refactor your code. This means to clean up your code without changing its functionality. Get rid of any unnecessary code. Simplify.
  3. Implement a memcache of the unanswered questions. That is, the first GET /123 will fetch the question from the datastore but the ones after will fetch it from the memcache. Remember to clear the cache if the owner of the question changes it.

This homework is due on Wednesday, April 6 @11am. You can turn it in here

Required Reading

No comments:

Post a Comment