SDA India is an online resource for Software, Development,IT, Architecture, Open Source, Mobile, Security, Databases, Delphi, C, OS, Asp, .Net, Php, Xml, Java

From the News Desk
Monday, 6. August 2007

Use Java to Improve Drupal's Scalability


Current Issue

Geert Bevin recently experimented with clustering Drupal with Terracotta running on Caucho's Quercus, a Java implementation of PHP. While checking the reasons beind the complaint about the scalability of Drupal on PHP, Geert looked through the layer cache implementation and found developers use the database as a cache. Short of using memcached, PHP doesn't support preserving object state across requests; so this method is alright. But tunneling everything through the database is bound to create a bottleneck.

Quercus, the Java implementation of PHP that runs in Resin, has a module system that allows the creation of PHP functions in Java. Geert got down to seeign if Terracotta could be used together with Ehcache to replace Drupal's caching system with a more scalable solution. Geert has put together a prototype to improve the scalability of a PHP CMS by using JVM-level clustering, where Drupal is using Ehcache which is clustered through Terracotta, although "very hackishly due to non existent Resin support". The current state of things are:
  • Resin launches another Java process that runs the actual web server, this means that resin.conf needs to be modified to actually use Terracotta with the servlet container.
  • By default Resin replaces the system classloader. This seems to go into an endless loop when used with Terracotta. Geert didn't go through it step by step to find the exact cause yet though. But he has made a patch that disables this system classloader entirely, which seems to work. Some features of Resin are most probably disabled due to this, but he hasn't investigated what exactly though.
  • Using Ehcache as a Quercus module and changing the Drupal cache handling makes it possible for Terracotta to cluster the Drupal cache entries.

A detailed set of instructions can be seen here.



Post a Comment
Name
Title
Comment
Very Good!


Posted by: junphine on August 21, 2007

Very Good! I think use APC can also improve Drupal's scalability. APC is a share memory solutions, so it should be used to cache some data such as variables, locale, etc..The goal is reduce the number of database communications.http://web.srv.cn
Menu
News Desk
Feature Stories
Articles
Interviews
Case Studies
White Paper
Analyst Corner
Planet SDA-India
SDA Events
INDIA IT Event Calender
IT Jobs
Advertise