Jaslabs: High performance Software

High Performance Software

PHP+Java=Resin

By Justin Silverton

What is Resin?

The ResinĀ® high-performance, open source application server features load balancing for increased reliability. Caucho’s Quercus(TM) is a fast, 100% Java implementation of the PHP language allowing developers to use PHP flexibility for the web interface and Java for stability.

Benefits (From Their website)

Quercus and Quercus’ PHP libraries are written entirely in Java, thereby taking the advantages of Java applications and infusing them into PHP. PHP applications running on Quercus are simply faster, easier to develop, more capable, more secure, and more scalable than any other PHP solution.

Performance - simply faster

Quercus outperforms straight mod_php by about 4x for MediaWiki and Drupal.
PHP developers can use Java tools like profilers to get in-depth information about the PHP program performance.

Development - fast, safe, and easy

PHP extensions written in Java are fast, safe, and relatively easy to develop compared to those written in C. Since Java is the library language, developers won’t need to be paranoid about third-party libraries having C-memory problems or segvs and are freed to concentrate on solving the objectives at hand.

Capability - powerful Java technologies at the developer’s fingertips

Quercus has the best of both worlds: PHP and Java. PHP applications can take advantage of Java technologies like JMS, EJB, SOA frameworks, Hibernate, and Spring.

Security - no more pesky C memory bugs

All Quercus extensions libraries are coded in Java. Therefore, developers do not have to worry about C pointer overruns and segmentation faults from PHP extensions anymore.

Scalability - PHP for the masses, literally

Thanks to Resin, PHP applications can beautifully scale to as many servers as desired.

PHP applications can now enjoy connection pooling, distributed sessions, fail-safe load balancing, and proxy caching. These benefits require no change in the PHP code.

The open source version (There is also a commercial version available) can be downloaded Here

Benchmarks

Benchmarks can be found here

PHP Apps that have been tested with Resin (and work)

  • DokuWiki 2006-11-06
  • Dragonfly CMS 9.0.6.1.7
  • Drupal 4.7.4
  • Gallery2 2.1.2
  • Joomla 1.0.11
  • MediaWiki 1.9
  • Phorum 5.1.16a
  • phpBB 2.0.21
  • phpMyAdmin 2.9.1.1
  • PHProjekt 5.2
  • PHP-Nuke 7.9
  • Wordpress 2.0.5
  • Xoops 2.0.16

Conclusion - will I be switching to resin?

It is an interesting concept, but I think I will have to do some major benchmark testing before I decide to switch any of my websites to a java based php application server.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Slashdot
  • StumbleUpon
  • Technorati

8 Comments so far

  1. tomh January 22nd, 2007 2:53 pm

    Justin, do you know of any [good] Resin hosting providers? Cheers, Tom

  2. Justin Silverton January 22nd, 2007 3:20 pm

    I don’t have any personal experience with this, but a good place to look is here

    (jsp,resin hosts)

    and http://www.webhostingtalk.com (search for “resin”). It’s a great forum for finding good hosting providers.

  3. Gaetano Giunta January 23rd, 2007 4:53 am

    Thanks for the nice article - or shall I call it pr release?

    All I could gather from this is “damn faster, erm, wait till I test it to see if it is true”…

    The one question I have, and I see no mention of the problem at all, is how many of the standard php extensions are available on resin? Are all of the linked as native code into the java exexcutable? Have they been replaced / recoded?

  4. Dave January 23rd, 2007 8:52 am

    But won’t this be stupidly slow?

  5. Justin Silverton January 23rd, 2007 9:44 am

    “Thanks for the nice article - or shall I call it pr release?”

    I am not affiliated with Resin or its creators. I came across it a couple of weeks ago and I thought people might be interested in it.

  6. Justin Silverton January 23rd, 2007 9:57 am

    a list of supported php extensions can be found here

  7. I am just a programmer » php+Java=Resin November 5th, 2007 9:12 am

    […] read more | digg story […]

  8. […] read more | digg story […]

Leave a reply