Posts Tagged ‘quercus’
Friday, October 31st, 2008
Over the last week, I had the pleasure of trying to get Pligg, a PHP content management system (CMS), to run on Quercus. It wasn’t easy due to a diabolical bug (more on that later), but it’s resolved for our upcoming 3.2.2 release and Pligg should run pretty swell.
So why another CMS? Quercus can already run Wordpress and Drupal, arguably the heavyweights in the PHP CMS arena. Well one of our good Resin users has over 50 Pligg sites and he wanted to migrate to Quercus. He had observed that PHP was being overloaded to such a point that all the linux swap space was being used up. So Quercus’ performance is very appealing to him. Checking my emails, it appears that he has been trying to run Pligg on Quercus for over a year :0. Talk about persistence and commitment!
The thing preventing him from running Pligg was that Pligg was reusing variables inside functions and declaring them global later on:
$a = "initial";
$a = "changed";
//$a here on out should be "initial"
Quercus is highly optimized and has optimizations for variables. If it sees the global statement inside a function scope, Quercus assumes that variable is global throughout the function. The issue was that any modifications to that variable was modifying it globally, when it should be modifying it locally, until the global statement is reached of course.
The question is: why would Pligg be reusing variable names and changing their scope? Why not use a different name? Why not put the global statement at the beginning of the function?
Sifting through their code, it appears that they eagerly initialize a copy of config objects. They do so by using includes. The includes store the results in a specific variable. So if you don’t want the includes to modify the global variable, then you better not have the global statement before these includes. We would never expect this, hence the Quercus bug. This is an example of unorthodox coding that PHP permits that we see all the time and it’s what makes it extremely difficult when we debug PHP applications.
Monday, October 20th, 2008
The Silicon Valley Code Camp is coming up in just under 3 weeks and they need to figure out how big of a room to assign to each talk. If you’re coming to the Quercus and/or BAM talks, please go and let them know your interest on this page: Caucho Sessions. That way we won’t have to worry about not having enough seats.
Monday, September 29th, 2008
You might have noticed that posts slowed down here after my talk at JavaZone, which is because I took some time off to see Scandinavia. But I’m back now and getting ready for even more upcoming events! Just a quick review:
- San Francisco Java Meetup - I’ll be speaking here again, this time about Resin’s OSGi container implementation, as well as general OSGi issues along with fellow Java Meetup regular, Andrew Headrick. This is just one week away on Monday, Oct 6 at 6:30. The signups are full right now, but keep an eye on the page in case anyone drops out…
- Resin Administration Training - There are still a couple of spots left for this course, so sign up ASAP to guarantee your seat. I’ll be teaching this at Marakana’s facility in San Francisco on October 22-24. It should be an action packed 3 days!
- Silicon Valley Code Camp - This informal, but highly technical conference is growing by leaps and bounds. With already over 500 signups, I expect the Code Camp to be a ton of fun and very successful. I’ll be speaking on Quercus and BAM, so stop by for those and the other speakers’ talks on Nov 8 & 9 at Foothill College.
- Devoxx - You might know this as JavaPolis or briefly JaVoxx, but the newly renamed Devoxx is still the same great conference that attracts developers from all over the world. It will be held Dec 8-12 in Antwerp, Belgium. I’ll be giving a talk there and Caucho is a plugin partner, so look for us on the convention floor as well.
Wednesday, September 17th, 2008
I’ve arrived at JavaZone in Oslo, Norway and I’ve been having quite a good time so far. The morning’s entertainment, a band that employed banging on dishwashers, freezers, and other loud boxes, was very rousing. The talks seem to be well attended as well, so I’m eager to see how many people show up for my talk on Quercus later today (Zone V, 15:45). There are also live projected videos of each speaker in the main hall and I just overheard someone say that you can point your headphones at each video to hear different speakers! The organizers have also set up a whiteboard area so that speakers and attendees can talk and brainstorm after the presentations. You can find me there after my talk…
Sunday, September 7th, 2008
I’m up doing research about the latest happenings in the Quercus community and thought I’d point out an interesting project that just popped up. Helma is “an open source web application framework for fast and efficient scripting and serving of your websites and Internet applications.” Daniel Ruthardt has just created a plugin that allows Helma to take advantage of PHP using Quercus. It’s still early on, but the project looks very promising.
Are you using Quercus either in production, as the foundation of a project, or in some other interesting way? Please comment and let us know about it! I’m collecting interesting cases for my JavaZone talk, so if you let me know this week, you might be featured!
Wednesday, September 3rd, 2008
Today, I had a call about Quercus and I’ve been working on my presentation for JavaZone and these two things made me realize that we still have some confusion around the various Caucho products and licenses. We’ve got some people working on real literature explaining all of this, but in the meantime, I thought I’d try to clear up some of the confusion with a quick post.
Tuesday, September 2nd, 2008
I’m going to be speaking at JavaZone this month about Quercus. If you don’t know JavaZone, it’s Scandinavia’s largest developer conference and will be half in English and half in Norwegian. If you’re in Oslo on September 17 at 3:45pm, stop on by and have a listen. This is a developers’ conference, so I’m going to take some liberties and dive into some real technical meat with code examples and an inside look at how Quercus works. It should be really fun.
Thursday, August 28th, 2008
I’ve been working on finishing up the Resin administration training course and one of the subjects is “When and why to use PHP on a Java server”. Of course, I’m referring to Quercus and as I wrote this section, I realized some things about the PHP and Java open source communities.
Java’s open source community is most well known for producing great libraries and frameworks, while PHP’s is most well known for producing great applications. In Java, it’s often assumed that you’re paying someone to produce the application while in PHP it’s often that you’re not paying anyone or you simply don’t have time to write a custom application. With these things in mind, Java and PHP really can be viewed as complementary technologies. So when would you use them together?
- When you need to get an application ready right away and there’s a popular PHP application available, but you’re a Java shop
- You want to unify existing but separate PHP and Java deployments into one
- Moving a PHP-only site to Resin for improved performance, reliability, and monitoring
- You need PHP for the frontend and and Java libraries on the backend and you want them to be able to talk to each other easily
These are just a few of the examples that I came up with, but I’m sure there are more. What has your experience been?
Tuesday, August 19th, 2008
This weekend’s WordCamp was really quite impressive. I wasn’t sure what to expect, having never been before, but I learned about a lot of interesting technologies and development strategies. It was so inspiring in fact, that I forgot to blog about it because I was upgrading to 2.6.1 and installing plugins yesterday.
I gave a talk on running WordPress with Quercus (slides here), which was well received for being the presentation right after lunch. Even so, there’s still a lot of work to do for us to improve the understanding of both the PHP and Java communities about what Quercus offers. One of the things I realized after the presentation is that I didn’t really show exactly how this could affect the WordPress user on the street.
During my presentation, I talked a lot about the joining together of the Java and WordPress communities. What does this actually mean if you’re a WordPress user though? Well, whether you know it or not, there’s a chance that you’ve already been reading blogs written in WordPress, running on Quercus (other than this one :-)). WordPress-related jobs are already appearing and will probably be increasing in number, so if you’re a WordPress user who’s thinking about going pro, it might be useful to you to get familiar with running WordPress on Java. There are some really big sites that are Java centric, who want to use WordPress. You could be the one to help them do it.
Tuesday, August 12th, 2008
I’ll be giving a talk at this week’s WordCamp in San Francisco on using WordPress with Quercus. Of course this site uses WordPress on Quercus, so we’re happy to get a chance to talk with other WordPress users. Are you running WordPress on Quercus? If so, let us (and the world) know!
If you’re interested in Quercus or WordPress or both together, come on out to WordCamp this Saturday.