• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,153
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Show homepage animation changer
  • (show sheet)

Transcript

  • 1. ZIMMER TWINS – D4.6 to D6
    • Ashok Modi
    • 2. August 9, 2009
    • 3. http://www.zimmertwins.com
  • AGENDA
    • Introduction
    • 4. About Zimmer Twins
    • 5. Why Upgrade?
    • 6. Why Drupal 6.X?
    • 7. Upgrading the Site
  • INTRODUCTION
    • About zinc Roe Design
    • 8. Based in Toronto.
    • 9. Make websites (and web games) aimed primarily at youth and non-profits.
    • 10. Site at http://www.zincroe.com
    • 11. About me (BTMash)
    • 12. Systems programmer.
    • 13. Work at California Institute of the Arts.
    • 14. 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
    • 15. The show provides a starting story line….
    • 16. And kids create an ending
    • 17. Best videos are given production value and broadcast on television
    • 18. ZT was entering its 3rd season
    • 19. It is currently shown in Canada-Tele-Toon, USA-NBC/Qubo, & Australia-ABC
    • 20. Over 500, 000 members
    • 21. Over 1.2 million user contributed nodes (or movie clips)
    • 22. Over 1.1 million comments
    • 23. Want to add new features to the site.
  • WHY UPGRADE THE SITE?
    New Features
    • Award participation points
    • 24. Award badges based on total number of points
    • 25. Create contests where users could vote on best content chosen by site editors
    • 26. Improve workflow for switching homepage animations
    • 27. Change method for choosing crowd pleaser movies.
    Better security
    • Current version of drupal unsupported on drupal.org (last update was in January, 2007!)
    • 28. Fairly easy to spam.
    • 29. 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
    • 30. Modules that were from community were no longer supported (and in case of our newsletters, had broken throttling mechanisms)
    • 31. Easier to build on work done by community to reach the goal.
    • 32. Drupal core has improved by leaps and bounds.
    • 33. Drupal community also grown by leaps and bounds (many excellent modules)
  • WHY DRUPAL 6?
    • Any Drupal version would have required a lot of work
    • 34. 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
    • 35. Theme registry (use theme devel module to figure out override theme calls/templates which was very useful)
    • 36. 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)
    • 37. 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?
  • 38. UPGRADING SITE CONT’D
    Strip Down:
    • Contributed modules and themes that is…
    • 39. The old code was not going to work so you don’t want something enabled that might cause some funny behaviour
    • 40. 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
    • 41. Upgrades build on top of old versions
    • 42. 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
  • 43. UPGRADING SITE CONT’D
    Development:
    • Once data upgrades were completed gracefully (the ungraceful parts will be mentioned near the end)
    • 44. See which modules can be used from d.o, what contributed modules needed to be upgraded, and which ones would be custom modules
    • 45. Ongoing process as more modules were actively upgraded by rest of community
    • 46. Started by upgrading / creating the smaller sets of modules
    • 47. Modules that didn’t rely on the movie saving / creation.
    • 48. 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
    • 49. We had to customize, develop and maintain these ourselves
  • UPGRADING SITE CONT’D
    Converting smaller custom modules:
    • sendtoafriend
    • 50. sponsor
    • 51. site_statistics (custom zimmertwins stats)
    • 52. about & extras converted into pages
    Converting larger custom modules:
    • Core movie module with frontpage animation settings, movieclipnodetype, and moviestarternodetype
    • 53. Moviepicks (select additional status for movies)
    • 54. movie_search module (converted to module so we can disable in case of large load on site)
    • 55. abuse
    • 56. watchlist
    • 57. sponsor
  • UPGRADING SITE CONT’D
    Notable Improvements:
    • very easy for theme developer to override series of my un-designed templates
    • 58. Easy to override core modules (override user module)
    • 59. Adding AJAX (AHAH) functionality was simple (abuse module uses jquery and ahah for moderating content on site)
    • 60. 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
  • UPGRADING SITE CONT’D
    More contributed modules
  • UPGRADING SITE CONT’D
    • Influence of Drupal conference:
    • 76. Midway through development timeline, attended Boston Drupal conference.
    • 77. Attended a seminar on messaging and notification frameworks
    • 78. Goal was to create module and api to get rid of the 100+ modules that provided bits and pieces of such functionality
    • 79. Opted to use framework over building own large module to perform same functionality
    • 80. Created module (comment_notifications) to email user when comment added to their node.
    • 81. 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:
    • 82. Userpoints& user badge modules
    • 83. Userpoints has api and hooks to create additional rules on when to award points
    • 84. Userbadges can award badges either to roles or to single user (though single user addition has to be either manually or through rules
    • 85. Created a bridge module that alters user badges form
    • 86. 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:
    • 87. Needed functionality to provide extra css info for a particular node (so our ‘credits’ page could take on extra css rules)
    • 88. Felt providing an ID for a given node was the easiest way to go.
    • 89. Module allowed you to create a specific id for a given node (altered node form to add a css id)
    • 90. 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:
    • 91. Votingapi hook implements check to give movie a ‘crowd-pleaser’ status if it meets requirements in total ratings and average rating.
    • 92. Awards extra userpoints to users on positive change in movie status
    • 93. Comment_spam_control
    • 94. Throttles number of comments an authenticated user can post (1 per minute…which stopped them from spamming a user to watch their movie)
    • 95. Comment_list
    • 96. Provides a strict list of comments a user select to post from.
  • UPGRADING SITE CONT’D
    Custom modules
    • Contest
    • 97. Allow users to vote on a particular movie
    • 98. Vote as many times as a user wants during the contest (free-for-all)
    • 99. View current tally of votes (or black out for regular users)
    • 100. Refresh page with random set of contestants after vote (using ahah functionality)
    • 101. 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.
    • 102. 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
  • 103. END of Talk on Modules!!!
  • 104. UPGRADING SITE CONT’D
    • Hurdles
    • 105. Migrating data
    • 106. Site was under latin1 encoding
    • 107. Drupal 5+ moved towards utf-8 encoding
    • 108. Tough due to size of data.
    • 109. Strip out character encoding of file created from mysqldump (so characters are not saved in utf8 format and garbled.
    • 110. Replace instances of latin1 with utf8
    • 111. Ensure content will migrate to database in utf8 format
    • 112. run perl -pi -w -e 's/latin1/utf8/g;'
    • 113. 90% of issue was resolved
  • UPGRADING SITE CONT’D
    • Hurdles
    • 114. Issue with users table and usernames
    • 115. In utf8,eva seen to be equal to éva so users who had ‘duplicate’ names would not be inserted into the database
    • 116. Login was painfully slow
    • 117. Usernames entered by user were compared with lowercase version of all names on site – check in mysql alone took nearly 3 seconds.
    • 118. Choices
    • 119. Keep table in latin1 encoding and deal with character encoding discrepancies
    • 120. Keep name column in utf8-binary encoding (so eva is not same as éva but deal with slow login.
    • 121. Opted for the latter
    • 122. Found issue on d.o dealing with slow login (http://drupal.org/node/83738)
    • 123. Login much faster now 
  • UPGRADING SITE CONT’D
    • Actual upgrade of site:
    • 124. Tested out ability to upgrade site multiple times
    • 125. Large dataset
    • 126. Needed to document full upgrade path.
    • 127. 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)
    • 128. Needed to see time to complete upgrade.
    • 129. Took approximately 18 hours to fully upgrade the site.
  • UPGRADING SITE CONT’D
    • Things We Learnt
    • 130. Ensure new site is under correct encoding or you'll pull your hair out!!!
    • 131. Don't always go for the latest and greatest
    • 132. 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.
    • 133. That said…was a great opportunity for us to help out with upgrading the modules.
    • 134. Use the Drupal overrides to your advantage.
    • 135. Take advantage of drupal’s multisite
    • 136. 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
    • 137. Now fixed so lower memory usage
    • 138. 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
    • 139. Site performs very well under load
    • 140. 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)
    • 141. Newsletters actually work
    • 142. Recently sent out approx 150k email newsletters without any glitches
    • 143. Recently upgraded the Australian version of the ZT site to D6 as well
    • 144. 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
    • 145. Integration with views
    • 146. Look into search technologies (sphinx, lucene) and possible ways to using it on site
    • 147. Caching via memcached/apc/files/??? (cacherouter)
  • Questions for Discussion?Thank you!!!