Grape Vine Case Study: DrupalCamp 2014
Grape Vine Case Study: DrupalCamp 2014
CASE STUDYRelaunching Grapevine.ca on Drupal
Grape Vine Case Study: DrupalCamp 2014
THE OBLIGATORY “ABOUT ME” SLIDE
● I’m James King (Hi!)● CTO Fenix Solutions Inc
● Since 2001● Drupal since 2009
● Since 1990!● One of Ottawa’s original Internet businesses
Dude, get on with it...
Fenix
Grape Vine
Grape Vine Case Study: DrupalCamp 2014
● Perl codebase. Over 10 years old
● Extremely limited administrative functions
● No CMS functions at all
● Extremely expensive media hosting
● Users could not self-manage their own listings
● Over 10,000 unique visitors a month in the busy season
THE “BEFORE”...back when the Spice Girls roamed the earth
Grape Vine Case Study: DrupalCamp 2014
● Time● Budget
● Needed CMS● Users/Permissions/Access to Content● Versioning and Workflow● Media Handling
WHY DRUPAL?Or “why not [Insert Framework Here]?”
The Big Ones
The Other Big Ones
Grape Vine Case Study: DrupalCamp 2014
● How generic is your requirement?
● Does a contrib module do what you need it to do… I mean, REALLY.
● Does the module have an module.api.inc file? Was it meant to be extended?
● Is the module being maintained? If not, do you have the time/inclination to step in?
● What about the UX?
CUSTOM vs CONTRIBCue the nerdy slap fights
Grape Vine Case Study: DrupalCamp 2014
● How business-specific are your requirements?
● Are you SURE there isn’t a contrib module that does what you need?
● Have you figured out a caching strategy?
● Are you going to have to build an admin UI? Are you going to have to integrate with Views?
● Are you prepared for the extra QA/QC?
CUSTOM vs CONTRIBNot the face!
Grape Vine Case Study: DrupalCamp 2014
● Originally tried the print module
● 10 years of kruft and bizarre display logic to deal with
● Complex multi-page layout with highly variable content
● Converting HTML to PDF was far too limited
● Not a feature we had planned to spend so much time on
PDF FEATURE SHEETSFinally, some real-world examples!
Grape Vine Case Study: DrupalCamp 2014
● Workbench Moderation worked out really well… until we implemented a multi-step sign-up process (CTools Multistep Wizard)
● By design, WBM wants to create a new revision on every node_save.
● Luckily WBM is implemented well. We were able to set properties on node object before save so it would save to current version.
MODERATED CONTENTI should write a blog post about this one
Grape Vine Case Study: DrupalCamp 2014
● OpenLayers worked great… until we imported all 4000 listings
● Views caching made it worse. Too many unique result sets, too many points.
● Reasonable performance limited map view to 30 points at a time
● Removed OpenLayers/Views entirely. Talked directly to Google Maps API.
MAPPINGYay OpenLayers! Booooo OpenLayers...
Grape Vine Case Study: DrupalCamp 2014
● Originally used the Statistics module
● Switched to GA API, pulls stats per listing
Sample Code: https://gist.github.com/jmk1ng/9442895
GOOGLE ANALYTICSSomething, something, NSA
Grape Vine Case Study: DrupalCamp 2014
● Realtors® are very keen to mass-solicit Grape Vine clients
● No generic solution to this very specific problem
● Can’t blindly block messages from agents as many are legit and welcome
SPAM!If only it were just penis pills...
Grape Vine Case Study: DrupalCamp 2014
● Couldn’t use Feeds or Migrate - data needed massive cleansing
● Needed to limit downtime as much as possible
● 10 years of ad-hoc formatting to support/cleanse
Sample Code: https://gist.github.com/jmk1ng/9536525
CONTENT MIGRATIONLike a matted rescue puppy
Grape Vine Case Study: DrupalCamp 2014
● Single Linux VPS
● Dual core CPU
● 8GB of RAM
● APC, Memcache (97% hit rate)
● 50GB Disk
● Amazon S3 for Media, New Relic for Monitoring
HOSTING + PERFORMANCEIf at first you don’t succeed, add more RAM
Grape Vine Case Study: DrupalCamp 2014
✓ Workbench Moderation✓ Geofield✓ Geocoder✓ Storage API✓ Memcache✓ Views
SUMMING IT UPLess is often more
47 Contrib Modules
7 Custom Modules
● Grape Vine Forms● Grape Vine Listings● Grape Vine Alerts● Grape Vine PDF
● Grape Vine Invoice● Grape Vine Dashboard● Grape Vine Data Export
× Panels× Display Suite× Context× WYSIWYG× Solr (yet)
Grape Vine Case Study: DrupalCamp 2014
● Multilingual listings!● Mobile-first, responsive search experience
THE FUTUREFaster, Better, Stronger
Grape Vine Case Study: DrupalCamp 2014
[email protected]@jmk1ng
QUESTIONS?Before you ask: boxer-briefs
Grape Vine Case Study: DrupalCamp 2014