Shuttercal
Practice Photography. Document Your Life. Have Fun! — Monday, 19th January, 2009
ShutterCal is a photo sharing site with a difference - it encourages contributors to upload one photo every day to help people reach a goal: whether that may be to improve their photography, watch themselves evolve over a year, or remember people and places they visit. ShutterCal started in 2007, and this week I spoke to developer Dan Ferrante to find out why he chose Django, some of the challenges he's faced, and how he uses Django and other open-source software to make his life easier.
Vital Stats
- 1500 users
- 73GB of images
- 10k hits daily
- 4000 lines of python + 2000 of templates
- Able to be managed as a part-time project
The Down-Low
ShutterCal is a photo sharing site that encourages contributors to upload one photo per day. It's used by people from diverse backgrounds: professional photographers showing off their skills, amateur photographers who want to hone their skills, and teenagers sharing their lives. It was started as a private Alpha in mid 2007, and was released to the public on December 30th 2007.
Founded by Dan and Scott, ShutterCal originally evolved from Scott's involvement in project365 with a manually-updated Flash interface. With Dan's help, the website was moved to Django as a part-time project over a few months. Aside from some outside assistance for the user interface, Django has been powering ShutterCal since it's launch with only a few hours of maintenance each week.
Prior to working on ShutterCal, Dan had been a Python programmer for a number of years. This narrowed down his choices when choosing a framework to use to TurboGears, Zope and Django. Particular about clean code, Don't Repeat Yourself (DRY) principles, and pluggable components, there was only one option in Dan's mind: "Django gave me all of these things, so it was the obvious choice."
Throughout the development process, Dan found some of Djangos' core functionality the most useful: everything from the pythonic layout of data models to contrib applications including authentication, sessions, caching and pagination got a heavy workout. By implementing simple caching throughout the application, Dan was able to speed up particular views by 400% with what amounted to only a few hours work. Recent updates have seen the number of SQL queries in more complex views drop to 10% of what they were a year ago.
The biggest problems faced? Migrating database schemas on the live website, moving from Django 0.97 to 1.0. For a website with over 4000 lines of Python code, "it took a while for me to iron out the bugs" says Dan. That's quickly offset by the cleanliness of the codebase, though. As ShutterCal is a part-time project, when Dan sits down to work on it after work "not having to troll through huge amounts of code makes things go a lot faster."
Although there are no short-term plans to open source the Django code that powers ShutterCal, Dan has utilised a number of popular open source projects including CentOS, Apache HTTPD with mod_python, lighttpd for static media, MySQL as the database back-end and memcached for caching. To keep tabs on servers, a number of systems including glTail and Ganglia are used, along with AWStats to analyse visitors actions.
Overall, Dan's experiences with Django at ShutterCal have been pleasurable and he says he would "absolutely" use Django again for future projects, although he remains tight-lipped on what will come next.
- Thanks to Dan Ferrante for managing to fit time in for this interview alongside a full time job, a busy side project and his vacation.
Thanks
Special thanks go to Dan Ferrante for this interview.
Shuttercal can be visited at http://shuttercal.com/. It is also listed at DjangoSites.org.
Comments
Posted by Dan
1:31 p.m. on Tuesday, 20th January, 2009
my caching strategy was to quash costly or numerous small database queries wherever possible. i cache the html that displays a lightbox thumbnail, i cache the stars next to username, and i cache the expensive userlist pages.
Homepage
Explore Contributions
View an Image
User List
Posted by Brian Neal
12:05 p.m. on Tuesday, 20th January, 2009
Cool. I would be interested in hearing more about the caching strategy he employed.