Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Tips and tricks for building Large web applications with Drupal<br />Presented by MihaiCeusan<br />                and Vio...
Using migraine for database migration (advantages and disadvantages)<br />how to use Drupal Module Install Scripts<br />Hi...
Introduction to the project<br />GROGGER ( getgrogger.com ) is a crowdsourcing group blog ( group + blog = grog )<br />Two...
BootstrapingDrupal<br />BootstrapingDrupal involves loading the necessary files in order to have the basic Drupal function...
Challenge - deployment<br />Next step: build a proper deployment process<br />Main architecture: <br />Development environ...
Using Migraine	<br />A Drupal site ( app ) is not made just from code but also from settings ( modules, blocks, views, the...
Using Drupal Install Scripts	<br />Drupal provides functionality to create module install scripts. <br />Save time on the ...
.install Files<br />create a file named module_name.install and put it in the module’s file directory<br />Hooks available...
Enabling / Disabling Modules<br />Enable a module:<br />module_rebuild_cache();<br />$module = array(‘my_module’);<br />dr...
Usage<br />You can use the Drupal Module Install Scripts for anything:<br />Enabling / Disabling Modules<br />Setting Syst...
Drupal Multisite Performance<br />ViorelZidariu-Popa<br />
Problems to solve<br />Lots of sites<br />Lots of users<br />Lots of content<br />A few feature/bug fix updates every mont...
Benefits of the cloud<br />Lots of resources<br />Hardware abstraction<br />Pay only what you use<br />
Distribute the load<br />Distribute the sites<br />Distribute the services<br />Load balance (pressflow)<br />Break it int...
Distribute the load<br />
Throwing caches at it<br />Proxying<br />Content delivery network (CDN)<br />Memcache<br />APC cache<br />
Using Drush for updates<br />Use it for updating code or DB, run the crons<br />Why it's not very well suited for multisit...
The Multisite update<br />The jobs: <br />sites offline<br />update code<br />update DBs<br />get sites back online<br />D...
Other improvements<br />Running crons<br />Snapshot for backups<br />Using tools such as<br />yslow<br />devel module<br />
Tips and tricks for building Large web applications with Drupal
Upcoming SlideShare
Loading in …5
×

Tips and tricks for building Large web applications with Drupal

3,857 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Tips and tricks for building Large web applications with Drupal

  1. 1. Tips and tricks for building Large web applications with Drupal<br />Presented by MihaiCeusan<br /> and ViorelZidariu<br />
  2. 2. Using migraine for database migration (advantages and disadvantages)<br />how to use Drupal Module Install Scripts<br />High Performance Drupal multisite in a cloud environment: <br />distributing the load, dividing the problem into more manageable tasks<br />using Drush for updates and automation<br />optimizing the Multisite update process<br />Goals of this Presentation<br />
  3. 3. Introduction to the project<br />GROGGER ( getgrogger.com ) is a crowdsourcing group blog ( group + blog = grog )<br />Two components: Drupal multisite instance for the grogs and a Code Igniter app that allows users to create a grog in just two steps<br />Grog creation is a two steps process:<br />Creating the Drupal site ( file system, new database, generation the settings.php file) – done via sh scripts<br />Creating the grog admin user based on the registration data – done via the Drupal BOOTSTRAP system<br />
  4. 4. BootstrapingDrupal<br />BootstrapingDrupal involves loading the necessary files in order to have the basic Drupal functionality in a remote php file( existing on the same server but outside the Drupalinstalation )<br />Bootstraping can be easily done: include the file /includes/bootstrap.inc and use the Drupal functions<br />
  5. 5. Challenge - deployment<br />Next step: build a proper deployment process<br />Main architecture: <br />Development environment<br />Staging environment<br />Production environment<br />Challenge : deploy changes from one environment to the others ( including different dev environments)<br />Code deployment done via version control ( GIT in our case )<br />
  6. 6. Using Migraine <br />A Drupal site ( app ) is not made just from code but also from settings ( modules, blocks, views, themes, etc )<br />Migraine ( Drupal test-to-production migration tool ) is a set of python scripts.<br />How it works ? Easy !!!Migraine uses the Drupal database categories ( config, content, temp, cache ). The deploy script does a db dump of the config files, you move to the new env and run the update scripts (updates the db)<br />
  7. 7. Using Drupal Install Scripts <br />Drupal provides functionality to create module install scripts. <br />Save time on the deploy and improve the Q/A process<br />Load a production db easily and run the updates to test the functionality before deploying<br />To deploy the updates, just run the update.php file and Drupal handles the rest for you!<br />
  8. 8. .install Files<br />create a file named module_name.install and put it in the module’s file directory<br />Hooks available to .install files<br />Hook_install()<br />Hook_uninstall()<br />Hook_enable()<br />Hook_disable()<br />Hook_requirements()<br />Hook_schema()<br />Hook_update_n()<br />
  9. 9. Enabling / Disabling Modules<br />Enable a module:<br />module_rebuild_cache();<br />$module = array(‘my_module’);<br />drupal_install_modules($module)<br />Disable a module:<br />module_rebuild_cache();<br />$module = array(‘my_module’);<br />module_disable($module);<br />
  10. 10. Usage<br />You can use the Drupal Module Install Scripts for anything:<br />Enabling / Disabling Modules<br />Setting System Variables<br />Custom SQL statements<br />CCK fields manipulation<br />Setting Permissions<br />Demo time!<br />
  11. 11. Drupal Multisite Performance<br />ViorelZidariu-Popa<br />
  12. 12. Problems to solve<br />Lots of sites<br />Lots of users<br />Lots of content<br />A few feature/bug fix updates every month to every site<br />
  13. 13. Benefits of the cloud<br />Lots of resources<br />Hardware abstraction<br />Pay only what you use<br />
  14. 14. Distribute the load<br />Distribute the sites<br />Distribute the services<br />Load balance (pressflow)<br />Break it into pieces<br />
  15. 15. Distribute the load<br />
  16. 16. Throwing caches at it<br />Proxying<br />Content delivery network (CDN)<br />Memcache<br />APC cache<br />
  17. 17. Using Drush for updates<br />Use it for updating code or DB, run the crons<br />Why it's not very well suited for multisite work<br />Why is it so slow?<br />
  18. 18. The Multisite update<br />The jobs: <br />sites offline<br />update code<br />update DBs<br />get sites back online<br />Downtime<br />
  19. 19. Other improvements<br />Running crons<br />Snapshot for backups<br />Using tools such as<br />yslow<br />devel module<br />

×