DrupalCon 2010 Trip Report – Day 2

Here is an overview and some notes from day 2 of the DrupalCon conference that Ian and I are attending in San Francisco. As Ian mentioned in yesterday’s report, day 1 of DrupalCon was mostly focused on the future of Drupal, specifically on the changes and improvements in the upcoming Drupal 7. Today’s sessions dealt much more with the current Drupal release, as well as with version-neutral topics.

Read on for more on the following topics:

  • Drupal deployment strategies
  • The Chaos tools for Drupal module development
  • Drupal in Education
  • Searching with Apache Solr
  • Recent MySQL happenings

Drupal deployment strategies

The session “Don’t Touch that Server”: A toolkit for zero-touch production environments focused on ways of deploying Drupal servers that don’t require SSHing into each machine and running updates. While this is hugely useful when managing 10-100s of servers, most of the techniques aren’t worth the effort for our little cluster of 4 webservers.

I did learn about a few neat tools and techniques that will likely be useful to improve the type of work that we do:

  • Splunk — A tool for aggregating, monitoring and viewing server logs from collected from many systems. This could make it much easier to see trends in the access and error logs of the three main-site web servers.
  • Syntax checking with PHPLintPre-commit hooks can be set up in our source-control systems just to make sure that we never push a typo to production.

The Chaos tools for Drupal module development

The session Leveraging the Chaos tool suite for module development discussed the variety of abilities included in the CTools module that make it much easier to build a variety of dynamic interfaces in Drupal.

Ajax without Javascript
AJAX Responder allows passing commands back and forth between JS and PHP.
Drupal7 AJAX framework based off of this CTools implementation.

Ajax modal windows, the easy way
Modal Dialogs – built on top of the AJAX responder. Allows building modal windows with forms all with just a bit of PHP. Handles form validation and submission.

Object cache – non-volitile cache useful for ‘unsaved states’ during multi-step forms.

Form Wizard – makes it much easier to create multi step forms. Conceptually, its a workflow of a separate single-page forms. Gives you back, finish, cancel, save buttons and controlling widgets and code.

CSS Tools – disassemble, reassemble, filter by properties/values, reassemble/render-css, compress CSS.

Dependent Fields – add two additional properties to form fields and the form will be dynamically changed based on choices.

Drop-down links – basically a single theme function, theme(‘ctools_dropdown’, …), to create drop-down js menus like the contextual options menus in D7 (panels ‘cogs’).

Drupal in Education

Before lunch Ian and I both went to a “Birds of a Feather” discussion on Drupal usage at Colleges and Universities. I split off with a sub-group to discuss the potential of Drupal as an LMS platform. To kick off efforts in this area, we formed a new LMS group at groups.drupal.org to discuss what features are needed in Drupal for it to replace Blackboard, Moodle, Sakai, and other LMS systems.

In conversations with Amherst developers over lunch we were reminded that their Ed-Tech group has already built a Gradebook and a Quiz module for Drupal. While these modules are currently tied somewhat to Amherst’s ERP system (Datatel), with some work they could likely be generalized to work with our Drupal installation as well as those at other schools.

There is another Quiz Module available for Drupal as well.

Keynote: Tim O’Reilly

The keynote today was a talk by Tim O’Reilly called Open Source in the Cloud Era. This was a nice talk, but not earth-shattering if you’ve heard Tim speak at his Web 2.0 conference or elsewhere. Good stuff, familiar theme.

Searching with Apache Solr

Ian and I both attended the Apache Solr Search Mastery session. We recently set up a test instance of the Apache Solr search engine and Ian tried to get it operational for doing faceted searching of custom content types on our site. Unfortunately the documentation on how to do this is scattered all over the internet and an operational system wasn’t created. This session answered all of our questions and should allow us to proceed with setting up a faceted search system as well as other custom search abilities (like section-scoped search) in the future.

Blog posts from the presenters:
http://acquia.com/blog/advanced-apache-solr-example-ip-based-access
http://evolvingweb.ca/story/apache-solr-mastery-how-add-custom-search-paths-hookmenu
http://acquia.com/blog/understanding-apachesolr-cck-api

Notes

Fixed Fields:
Use the site & hash fields to enable using a single search index for multiple sites.
String type is for exact-matched strings like taxonomy terms rather than partial-matched text.

Dynamic Fields:
Allows you to avoid customizing the the schema for custom content fields. These are set up by having a wild-card field for each data-type used in CCK.
CopyFields for strings allow sorting on string fields.
NodeAccess dynamic field allows restricting results based on permissions for most common node-access modules. Not sure if this will work with MM.

APIs:
hook_apachesolr_update_index: Allows adding extra data (such as thumbnail image URLs) to the search index).

hook_apachesolr_node_exclude: Allows custom logic for excluding nodes from search results.

Custom search paths:
Use hook_menu to build up the nice search paths.
Use hook_menu_alter to change the layout of the search page.

Theme search results with custom theme functions.
Note: solr doesn’t do any security filtering of results.

Indexing CCK field info
http://acquia.com/blog/understanding-apachesolr-cck-api
6.1 branch — Fields captured by default: strings in select/options fields
6.2 branch — Adds date fields.

hook_apachesolr_cck_fields_alter(&$mappings): Used to add/change which fields are indexed and how they are indexed.

Recent MySQL happenings

The The Future Of MySQL: Forks, Patches And Decisions session was a good overview of the state of the MySQL database world now that pluggable storage engines are getting more common, Oracle bought Sun (and by extension MySQL-AB), and other developments.

The Oracle InnoDB plugin
http://www.innodb.com/products/innodb_plugin/
– Higher performance version of the InnoDB engine. “Amazing”. Upgrade if at all possible.

XtraDB plugin from Percona
http://www.mysqlperformanceblog.com/2008/12/16/announcing-percona-xtradb…
– A fork of the Oracle InnoDB plugin.
– A big benefit from splitting Buffer Pool Mutex into typed mutexes for each operation so that non-conflicting operations won’t lock.
– Rewrite of RW Locks.
– More configuration for IO Thread Numbers, IO Capacity.

Ourdelta/Open Query – provides builds of MySQL with patch-sets from various sources (Google, etc).

MySQL 5.1 – What’s new?
– Row level Replication rather than SQL-based replication. Removes the need for a lot of strange locks that were required to get SQL-based replication working. Removes the need for repeatability of SQL statements during replication. Still many stability issues, but hopefully they will be fixed soon.
– InnoDB Plugin

MariaDB/MontyProgram
– Pool of threads like apache rather than forking.

Upcoming stuff:

MySQL5.5 – SemiSynch Replication. Allows you to know that the data has been replicated to at least one slave.

Upcoming in MariaDB 5.2: varchar/blob for heap to prevent temporary tables from going to disk.

Other Notes:

Do not put a UNION inside a view! – Performance nightmare.

One thought on “DrupalCon 2010 Trip Report – Day 2

  1. Clif

    Drupal using Solr as a search module should work fine . Recently I came across another interesting article discussing how Drupal’s integration with Solr technologies should further enhance it’s efficiency with addition of features like faceted navigation. U can chk outhttp://www.lucidimagination.com/blog/2009/02/19/d… for details.

Comments are closed.