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:
- You will first clean up your web app of all the cruft it has accumulated. This includes:
- Eliminating all links to any specific homeworks (hw6, hw7...)
- Making sure there are no dead links or links that cause your app to crash.
- Make sure that after creating a question the user is taken to that question's page.
- Adding all the needed navigation links so the user can move easily move around.
- We can see all the questions of a user.
- The app is simple to use.
- Refactor your code. This means to clean up your code without changing its functionality. Get rid of any unnecessary code. Simplify.
- 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
No comments:
Post a Comment