Tuesday, December 2, 2008

Project Raven

We've been working for a few months now on a project that we're ready to take the wraps off of a bit. It's ambitious, but Roadsend PHP always has been.

We've started a complete rewrite of Roadsend PHP. The rewrite will address some of the problems we've had with the old code base, and hopefully open up the project to a wider range of programmers who would like to contribute.

The new code base is written in C++ and uses LLVM for code generation. LLVM stands for Low Level Vritual Machine and provides a complete set of tools that allow us to implement a highly optimized code generator, JIT and static (native) compiler. For more information, see the LLVM website.

We're also relying on the Boost C++ libraries. These are well know, portable, peer-reviewed libraries providing lots of the low level functionality needed for the runtime. See the Boost website for details.

Rounding out the major third-party libraries we've chosen is ICU: International Components for Unicode. This library provides all the necessary tools for full unicode and internationalization support.

Some of the goals of this rewrite include:
  • Highly optimized code generation
  • Full unicode support
  • Latest PHP language features (namespaces, lamda functions, etc)
  • Clean, easy runtime API
  • Portability
In the current codebase, most of the major components are in place. Simple scripts can be compiled statically (native binaries) or run through the JIT. Full unicode parsing is in place. Most major runtime components have been started.

You can checkout or browse the codebase at the new development site:

We're looking for contributors so if you'd like to help, please speak up! You can find us in #roadsend on FreeNode IRC.

Saturday, October 4, 2008

How It Started

Recently, while writing a talk proposal for Roadsend PHP, I wrote down a brief history of how it got started. On a new blog intended to discuss the development and future of Roadsend PHP, it seems appropriate to start with a recap of the past. So, here it is:


Roadsend, Inc. is a programming and hosting company founded by Jon Michel and Shannon Weyrick and based in Fishkill, NY that has been in business since 1999. Roadsend has used PHP as its main server-side programming language since before the release of PHP 4.0.

Roadsend released its first open source project, the PHP SiteManager Web Framework in 2001. Roadsend SiteManager and the succeeding Roadsend Portal CMS have been in development and use for all company projects since that time.

The idea for Roadsend PHP began life at Roadsend in 2002 while investigating the creation of a Zend extension for speeding up Roadsend SiteManager by replacing some of the functionality with equivalent C code. Roadsend employee Tim Daly, Jr. (now at Yahoo) had the alternative idea of creating our own implementation of PHP that would compile the existing PHP version of SiteManager to native binary.

For a time, both the C extension and the compiler were developed simultaneously. However it was decided to abandon the C extension and instead focus all effort on the new compiler implementation, which (it was hoped) would not only fulfill the desire for more speed but also offer functionality that the original PHP could not offer.

Over the next several years we managed to develop a full implementation of the PHP language, including native compiler, interpreter, runtime, extensions, debugger, and full blown Windows IDE. It could do things the original PHP couldn't, like compile a site to a single FastCGI binary, or with an embedded web server so that it could serve itself.

Roadsend PHP was originally offered as a commercial (closed source) solution. It was re-released as an open source project in 2007 under the GPL and LGPL licenses.


Of course, it hasn't yet taken over the PHP world, and there are several reasons for that. We intend to address these reasons, and that will be the focus of this blog. Stay tuned.