Recently, I put a finishing cleanup on the PHPCR API, the port of the Java Content Repositry API (JCR) to PHP. PHPCR is implemented by Jackalope, which got a whole team at Liip working at it to fix the failing tests and fill in missing bits.
The JCR is a Java standard for storing content. Probably the best way to think of it is as a file system with flexible meta data and a couple of extras like query, versioning or access control. It is used in CMS and DMS systems, for exapmle Day Communique or Alfresco.
With lots of input from Benjamin Eberlei and discussions on the Symfony2 cmf project mailing lists, I stripped all Java specific stuff out of the PHPCR API, making it more PHP. Most notably, we got rid of all the elements that are only relevant in strongly typed languages. Plus PHPCR now specifies to use the standard PHP iterators instead of specific classes that could not be used in foreach. If you had a look at the earlier interfaces, you will notice that we now use the PHP 5.3 namespaces. A full list of the changes is documented in from JCR to PHPCR.
While PHPCR defines the API, Jackalope is an implementation of that API. In the last few weeks, things got a real boost, as a full team at Liip is completing the implementation. We aim to have a beta release of Jackalope ready by the end of the year. Our implementation talks to the Java Jackrabbit backend for data storage. This is a quite performant setup, plus it allows to access data in existing Jackrabbit-based products. Ideas exist how we could write a PHP-only storage layer, but for now, we focus on creating a fully working implementation with Jackrabbit. First performance tests are quite promising. Chregu did a couple of performance tests and found that Jackrabbit scales really well. Having 15 Jackrabbits share one database backend with 350’000 nodes and doing requests scaled linear and the database did not get overloaded. Ask him for more details – maybe he is writing a blog post about the performance topic.
Our plan is to use the PHPCR standard as a storage backend for the upcoming Symfony2 cmf (content management framework). We already started to build a Symfony2 jackalope bundle. If you are more interested in the cmf than in the underlying storage: Stay tuned, we hope to release a doctrine2 binding for PHPCR soon and then go further with the cmf components beginning of next year.
By the way: We have a concrete use case for the whole cmf. Liip is using it to re-build a large and well visited website. More on this some time next year.
Architecture concept for the cmf with PHPCR/Jackalope.
Wow this is really interesting. I like the idea. First thing i thought when i saw the article was “some poor dudes are writing yet another content repository” :- ).
Having a PHP client for jackrabbit could be really cool.
Well done guys. Please post more and let us know when you have beta ready :)
Great news dudes. Your work is fundamental for all the ones looking at building new generation CMS with PHP. Keep it going!
Right now its using davex which is a webdav dialect. Now the idea with Jackalope is to have no Java on the client side at all. In the future the plan is to even make Java on the backend optional by developing a PHP backend.
Great news! I see no mention of the transport layer between PHPCR and the repo. Is some direct-java-call transport layer planned?