Wednesday, December 31, 2008

Java Bridge

I work in the team developing the PHP runtime for WebSphere sMash (Project Zero). The PHP engine is implemented in Java. One very powerful feature of the PHP runtime is its Java Bridge. The aim is to allow completely seemless integration between Java, PHP and Groovy. We released WebSphere sMash 1.1 just a few weeks ago and are hard at work on the next version already. With this in mind I've posted some slides that show what the Java Bridge can do here.  

There is also a developerWorks article here which shows how to use the Apache Lucene libraries in sMash.

Because we compile PHP scripts down to Java byte code, the Java Bridge is also extremely fast. This has made it possible to do some interesting integration with sMash PHP into products other than web server technology. For example, we shipped a new feature in WebSphere Message Broker at the end of November so that custom transformation and routing logic can be written in PHP. 

Message Broker is the brains behind many seriously high traffic systems (from various stock exchanges to the Wimbledon Tennis Championships). This kind of business logic is performance sensitive and the fast PHP/Java interop really helps. There is more information about the new PHP Compute Node here.

If you are interested in PHP you might also be interested in Zoe's blog - she recently posted about some related work we have been doing to integrate sMash into CICS. All of this goes to show how PHP's flexibility makes it a really good general purpose programming language beyond just the web application space.