Zimmertwins Presentation
Upcoming SlideShare
Loading in...5
×
 

Zimmertwins Presentation

on

  • 1,528 views

 

Statistics

Views

Total Views
1,528
Views on SlideShare
1,527
Embed Views
1

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Show homepage animation changer
  • (show sheet)

Zimmertwins Presentation Zimmertwins Presentation Presentation Transcript

  • ZIMMER TWINS – D4.6 to D6
    • Ashok Modi
    • August 9, 2009
    • http://www.zimmertwins.com
  • AGENDA
    • Introduction
    • About Zimmer Twins
    • Why Upgrade?
    • Why Drupal 6.X?
    • Upgrading the Site
  • INTRODUCTION
    • About zinc Roe Design
    • Based in Toronto.
    • Make websites (and web games) aimed primarily at youth and non-profits.
    • Site at http://www.zincroe.com
    • About me (BTMash)
    • Systems programmer.
    • Work at California Institute of the Arts.
    • Primarily help with patches and upgrades for contrib modules on d.o.
  • ABOUT ZIMMER TWINS
    • ZT was created in 2005 as a show on Tele-Toon
    • The show provides a starting story line….
    • And kids create an ending
    • Best videos are given production value and broadcast on television
    • ZT was entering its 3rd season
    • It is currently shown in Canada-Tele-Toon, USA-NBC/Qubo, & Australia-ABC
    • Over 500, 000 members
    • Over 1.2 million user contributed nodes (or movie clips)
    • Over 1.1 million comments
    • Want to add new features to the site.
  • WHY UPGRADE THE SITE?
    New Features
    • Award participation points
    • Award badges based on total number of points
    • Create contests where users could vote on best content chosen by site editors
    • Improve workflow for switching homepage animations
    • Change method for choosing crowd pleaser movies.
    Better security
    • Current version of drupal unsupported on drupal.org (last update was in January, 2007!)
    • Fairly easy to spam.
    • Did not know of exploits until too late.
  • WHY UPGRADE THE SITE? CONT’D
    Use work from community
    • Nearly all modules (core and custom) were maintained internally
    • Modules that were from community were no longer supported (and in case of our newsletters, had broken throttling mechanisms)
    • Easier to build on work done by community to reach the goal.
    • Drupal core has improved by leaps and bounds.
    • Drupal community also grown by leaps and bounds (many excellent modules)
  • WHY DRUPAL 6?
    • Any Drupal version would have required a lot of work
    • Upgrade path in D4.7, D5, and D6 were equally large so to narrow down which to use…
    D4.7 - was older (security issues, better, and custom modules were needed)
    D5 - had gained a lot of support from the community
    D6 - number of enhancements:
    • Memory management
    • Theme registry (use theme devel module to figure out override theme calls/templates which was very useful)
    • Views and CCK (moreso CCK) were not necessary for our site at that time (Views would be helpful but main modules would still require lots of work)
    • Finally, we wanted to get ourselves familiar with D6 so the site upgrade was a good opportunity to see what it can do!
  • BIG Q!
    HOW DID WE UPGRADE THE SITE?
  • UPGRADING SITE CONT’D
    Strip Down:
    • Contributed modules and themes that is…
    • The old code was not going to work so you don’t want something enabled that might cause some funny behaviour
    • See how much change is necessary in the database from D4.6 to D6
    Upgrade the database
    • Upgrade from 4.6 to 4.7, then from 4.7 to 5, and finally from 5 to 6
    • Upgrades build on top of old versions
    • Safest way to ensure core data is safely upgraded and accounted for
    Steps 1 & 2 took approximately 2 weeks to iron out other steps in process
  • UPGRADING SITE CONT’D
    Development:
    • Once data upgrades were completed gracefully (the ungraceful parts will be mentioned near the end)
    • See which modules can be used from d.o, what contributed modules needed to be upgraded, and which ones would be custom modules
    • Ongoing process as more modules were actively upgraded by rest of community
    • Started by upgrading / creating the smaller sets of modules
    • Modules that didn’t rely on the movie saving / creation.
    • Quick to create functionality that didn’t yet rely on look / feel.
  • UPGRADING SITE CONT’D
    • Old site:
    -about -abuse -bad words
    -block -blog -cache exclusion
    -extras -favourites -filter
    -flexiblock -help -legal
    -locale -menu -movie
    -node -page -path
    -rating -search -send to friend
    -site stats -sponsor -statistics
    -story -subscription -system
    -telepicks -user -watchdog
    -watchlist -taxonomy -phplist
    • Fairly small list but keep in mind D4.6 was unsupported & most of these weren’t available on Drupal.org
    • We had to customize, develop and maintain these ourselves
  • UPGRADING SITE CONT’D
    Converting smaller custom modules:
    • sendtoafriend
    • sponsor
    • site_statistics (custom zimmertwins stats)
    • about & extras converted into pages
    Converting larger custom modules:
    • Core movie module with frontpage animation settings, movieclipnodetype, and moviestarternodetype
    • Moviepicks (select additional status for movies)
    • movie_search module (converted to module so we can disable in case of large load on site)
    • abuse
    • watchlist
    • sponsor
  • UPGRADING SITE CONT’D
    Notable Improvements:
    • very easy for theme developer to override series of my un-designed templates
    • Easy to override core modules (override user module)
    • Adding AJAX (AHAH) functionality was simple (abuse module uses jquery and ahah for moderating content on site)
    • Use drupal_system_listing(directory_path) and drupal_parse_info_file($file) to create your own set of custom drupal files to parse for specific settings!
  • UPGRADING SITE CONT’D
    Contributed modules
    • Google analytics
    • Userpoints
    • Userpoints basic
    • User badges
    • Cache exclude
    • Legal
    • Login toboggan
    • Login destination
    • Favorite_node
  • UPGRADING SITE CONT’D
    More contributed modules
    • Votingapi
    • Very flexible (can be used for more than simple ratings)
    • Hooks to use for other stats
    • Fivestar
    • Messaging
    • Frameworks
    • Token
    • Simplenews
  • UPGRADING SITE CONT’D
    • Influence of Drupal conference:
    • Midway through development timeline, attended Boston Drupal conference.
    • Attended a seminar on messaging and notification frameworks
    • Goal was to create module and api to get rid of the 100+ modules that provided bits and pieces of such functionality
    • Opted to use framework over building own large module to perform same functionality
    • Created module (comment_notifications) to email user when comment added to their node.
    • We were able to get back email news letter functionality through a module called simplenewsand ‘pretty’ emails via small modifications to the mimemail module (which has now been properly upgraded by the maintainer – need to upgrade our module)
  • UPGRADING SITE CONT’D
    • Using Form Alter Hook – userpoints_badges:
    • Userpoints& user badge modules
    • Userpoints has api and hooks to create additional rules on when to award points
    • Userbadges can award badges either to roles or to single user (though single user addition has to be either manually or through rules
    • Created a bridge module that alters user badges form
    • Contains extra field where you can specify minimum number of points to get badge (leave blank or 0 to discard check)
  • UPGRADING SITE CONT’D
    • Using form alter hook – node_css:
    • Needed functionality to provide extra css info for a particular node (so our ‘credits’ page could take on extra css rules)
    • Felt providing an ID for a given node was the easiest way to go.
    • Module allowed you to create a specific id for a given node (altered node form to add a css id)
    • With this could create additional design particular to one type of page or a series of pages with that particular id
  • UPGRADING SITE CONT’D
    Custom modules
    • Movie userpoints voting module:
    • Votingapi hook implements check to give movie a ‘crowd-pleaser’ status if it meets requirements in total ratings and average rating.
    • Awards extra userpoints to users on positive change in movie status
    • Comment_spam_control
    • Throttles number of comments an authenticated user can post (1 per minute…which stopped them from spamming a user to watch their movie)
    • Comment_list
    • Provides a strict list of comments a user select to post from.
  • UPGRADING SITE CONT’D
    Custom modules
    • Contest
    • Allow users to vote on a particular movie
    • Vote as many times as a user wants during the contest (free-for-all)
    • View current tally of votes (or black out for regular users)
    • Refresh page with random set of contestants after vote (using ahah functionality)
    • Can choose if contest should be based around users or nodes and admins enter the uid/nid of the content they want as part of contest.
    • Module wasn’t around at time (currently versus and another module named contest have been contributed – came out around same time we finished work on this module)
  • UPGRADING SITE CONT’D
    • Modules for D6X:
    -abuse -watchlist -blog
    -comment -contact -help
    -locale -menu -path
    -php filter -search -statistics
    -taxonomy-update status -upload
    -block -filter -node_css
    -system -user -mime mail
    -simplenews-simple mail -comment notification
    -notifications -cache exclude -comments spam control
    -googleanalytics -legal -login destination
    -login toboggan -token-userpoints
    -user points basic -user points-userpoints badges
    -fivestar -voting API -contest
    -favourite_node -movie -moviepicks
    -movie pics voting user points -movie search -node css
    -send to a friend -site statistics -sponsor
    -messaging -user badges
  • END of Talk on Modules!!!
  • UPGRADING SITE CONT’D
    • Hurdles
    • Migrating data
    • Site was under latin1 encoding
    • Drupal 5+ moved towards utf-8 encoding
    • Tough due to size of data.
    • Strip out character encoding of file created from mysqldump (so characters are not saved in utf8 format and garbled.
    • Replace instances of latin1 with utf8
    • Ensure content will migrate to database in utf8 format
    • run perl -pi -w -e 's/latin1/utf8/g;'
    • 90% of issue was resolved
  • UPGRADING SITE CONT’D
    • Hurdles
    • Issue with users table and usernames
    • In utf8,eva seen to be equal to éva so users who had ‘duplicate’ names would not be inserted into the database
    • Login was painfully slow
    • Usernames entered by user were compared with lowercase version of all names on site – check in mysql alone took nearly 3 seconds.
    • Choices
    • Keep table in latin1 encoding and deal with character encoding discrepancies
    • Keep name column in utf8-binary encoding (so eva is not same as éva but deal with slow login.
    • Opted for the latter
    • Found issue on d.o dealing with slow login (http://drupal.org/node/83738)
    • Login much faster now 
  • UPGRADING SITE CONT’D
    • Actual upgrade of site:
    • Tested out ability to upgrade site multiple times
    • Large dataset
    • Needed to document full upgrade path.
    • Created a migration script so data from deprecated modules (about, extras, favourites and more) would migrate over to the new in-use module (page, favourite_node, etc)
    • Needed to see time to complete upgrade.
    • Took approximately 18 hours to fully upgrade the site.
  • UPGRADING SITE CONT’D
    • Things We Learnt
    • Ensure new site is under correct encoding or you'll pull your hair out!!!
    • Don't always go for the latest and greatest
    • many modules had not been ported over to D6 when we started on the project--as an easy example, no views or cck at the time.
    • That said…was a great opportunity for us to help out with upgrading the modules.
    • Use the Drupal overrides to your advantage.
    • Take advantage of drupal’s multisite
    • Previously all modules were in core module directory, site structure was in such a way that zimmertwinsaustralia and zimmertwins USA had to run from separate directories
    • Now fixed so lower memory usage
    • Don’t call contributed module functions from a theme (or atleast don’t call them unless you check the the particular module is enabled).
  • UPGRADING SITE CONT’D
    • Things as they are now
    • Site performs very well under load
    • Maintenance on modules is easier (even though there are now 55 modules versus 31, actively maintaining at most 15 modules as opposed to over 20)
    • Newsletters actually work
    • Recently sent out approx 150k email newsletters without any glitches
    • Recently upgraded the Australian version of the ZT site to D6 as well
    • Upgrading the theme and testing took a little over 1 week and running through the migration took a little over 4 hours.
  • UPGRADING SITE CONT’D
    • Planning for future
    • Integration with views
    • Look into search technologies (sphinx, lucene) and possible ways to using it on site
    • Caching via memcached/apc/files/??? (cacherouter)
  • Questions for Discussion?Thank you!!!