Archive for category Software Reviews

Cherokee vs Apache : An alternative web server

As I have been developing for the web for over a decade, I have become comfortable with tools and technologies which have helped me get the job done. Some of these technologies I have seen evolve and progress into what are now essential and very powerful solutions. I have established an affinity with many of these tools and without doubt the Apache web server qualifies as such a technology for me.

Using Apache over the years as my main web server, I have produced all types of software solutions for many diverse businesses within many different industries.  Apache has served me well and I am an advocate of the old saying ‘If it’s not broken, why fix it’ (within reason). Until recently that is….

Over the past few years in the distant background I have heard mention of Cherokee as being a viable alternative to Apache, with some claiming it offers benefits. These have been whispers registering in the distance, but didn’t sound interesting enough to pursue and invest my time as Apache was doing it’s job well. However recently these whispers became a little louder following a few conversations with a work colleague singing Cherokee’s praises. What caught my attention most from the conversations wasn’t simply that Cherokee was faster, but that Cherokee was much easier to use and quicker to configure. As I don’t like ‘shaving Yaks‘, my approach was that if I start hitting obstacles, I’ll leave it for another day which contains more than 24 hours; after all Apache is working well for me.

My local lightweight development environment consists of a Linux VM (Fedora) which I operate using VirtualBox. I deliberately reduce my VM’s resource allocation such as setting my RAM allocation to 512mb on my VM to encourage good code and to identify memory leaks. I have the other usual stuff setup such as Zend Framework, xdebug, MySQL etc. This was the machine which was going to carry out the test switch from my trusted Apache to Cherokee.

I disabled Apache and installed Cherokee using the supporting well written user guide. Within minutes Cherokee was up and running and there we NO problems! I was expecting some configuration hurdles as per usual, but nothing. My sites were running as if I was on Apache and there were no noticeable differences. I configured the logs to act as the same as Apache and all was set.

As I delved deeper into the setup guide I was pleasantly introduced to Cherokee’s administration interface. This was a pleasant surprise as I’m so used to hard coding configuration information into httpd.conf. This interface presents configuration options for all the usual server settings such as ‘Virtual Servers’, ‘Directory Sources’, ‘Logging’, ‘Security’ etc. The beauty of this is not that it’s simply a little prettier than the command prompt, but it’s quicker to use. You can configure your server settings simply and quickly which are two good properties to have on your side.

Although I was impressed so far, the remaining challenge that Cherokee must live up to for me is it’s speed advantages. In the spirit of keeping things simple and to get a loose overview on performance advantages I thought I’d simply use ‘Zend Controller’ which is bundled with ‘Zend Server CE‘ to test how many requests per second both Apache and Cherokee could handle in turn upon my humble local virtual machine. From these tests I obtained the following results :

Apache Web Server Results

Zend Controller testing Apache requests per second

Apache requests per second on local VM

Cherokee Web Server Results

Cherokee web server

Cherokee requests per second on local VM

As you can imagine I was quite impressed with what the results presented. The results roughly show that Cherokee could handle 2.5 times more requests per second that Apache! That is no small margin!

What does this mean for me going forward? Well the first things that went through my mind understandably were cost and time savings. Potentially this could reduce the need for more hardware. Less hardware means less purchase costs and less maintenance time. Obviously there are other factors to consider before jumping the gun, but Cherokee certainly has my attention now. I will definitely be including Cherokee in my future plans. An exercise well worth the time.

If anyone reading this has done the switch, please feel free to reply to this post with any feedback

Related Link : alobbs.com

, , , , , , , , , , ,

3 Comments

Common Misconceptions of PHP

As we have just rolled over to 2010 I thought I would compile a list of 4 common questions often raised against PHP from people within the IT industry (no particular user groups). Each of these 4 statements were mentioned to me within 2009, but stem back many years in some cases. Some of these questions demonstrate plain ignorance in some cases, others just a little confusion as a result of lack of understanding or exposure. Therefore I hope this contributes to clearing up some obvious misconceptions by my provision of some brief answers.

  1. PHP is not a secure language
  2. Believe it or not this was stated to me by a highly ranked person within the development community. I was very surprised that such a statement was put forward considering PHP is a scripting language and security is not a definitive answer, but an on going process in which every facet of IT must undergo constantly to remain secure. To clarify this is a case of blaming poor workmanship on the tools. Although some tools are better than others, in no way do I believe this statement to be true. PHP can be as strong as the best of them in terms of security and some of the worlds most secure systems including many systems of the financial services industry as an example which hold vast amount of sensitive information can be found to be written using PHP. When using a tool to build something, the end result is that of the craftsman effort, ability, knowledge and experience. Keeping the argument of operating system security out of this which would be hosting PHP, to obtain security you need good, experienced and security aware developers. I personally believe this misconception often raises it’s head because of other languages restrict development to the framework or coding environment and developers within these environments don’t have to confront some areas of security as a result of this. I don’t think it’s good for developers to rely upon security being dealt with away from their application by making it someone or something else’s responsibility. A good craftsman will make it their job to be aware of system security and test their application before release as well as include continuous monitoring and alerting tools to support the application. Obviously there are those which specialise in such areas and their knowledge should be referred to in times of doubt or curiosity via supporting texts and communities. PHP is as secure as the developer’s knowledge and testing/release procedure involved with it as with most other languages.

  3. PHP doesn’t have good support for OOP
  4. I’m surprised that some people still think this. Before the release of PHP5 including the Zend 2 Engine, which was 13/07/2004 this would have been true. However please keep up people, we are in 2010 now and OOP support for PHP has been in place for over 5 years! I haven’t written procedural code for years with the exception of the odd testing script and procedure. There are great libraries available as well for those looking to extend OOP ability including such libraries as SPL, PECL, PEAR to name but a few. There are also some very fast moving and powerful frameworks available fully supporting OOP including such Frameworks as Zend Framework, Symfony, CakePHP, Codeigniter. These are also become very popular and demand for such frameworks from the workplace is rapidly increasing (see my other post).

  5. PHP is slow
  6. Yes believe it or not I have heard people claim this. PHP is pretty damn fast as a scripting language written in C. If people say PHP is slow, I don’t believe the have looked at the problem or debugged their code well enough. There are so many factors that influence speed such as the OS, memory, debug code, logging scripts, the implemented code, other applications on the server etc. If your PHP code is running slow, debug it and find the problem. It’s likely that the problem could sit with any of the above or it could be badly written code. There are good debug tools out there such as Xdebug which could save you some time finding the problem. Remember PHP is so versatile you can even extend it in C. If you are doing something very complex in PHP and by taking it down a layer might reduce some of the functions taking some time, you have the option to write an extension if needed. I personally have never had to do this, but have seen it done for a workplace specific extension and it worked perfectly and very quickly.

  7. PHP is an amateur language
  8. With full OOP support and factoring in that it’s one of if not the most widespread scripting language and as mentioned briefly in point 1 above, you can find PHP in almost all industries. Now I am not one to suggest the best technology is the most widespread (no names mentioned). However if PHP was a amateur language why is it so popular in so many professional industries which demand professional results. You can write pretty much anything you want using PHP and it can be as simple and complex as you want it to be. I have used Java quite a bit in the past and often find myself using the same code design texts to reference my PHP objects as my Java objects. I even apply the same design pattern sources for both languages. An example is the built in observer pattern interface in Java, (java.util.Observer) PHP also has this (SplObserver). Again I feel that stating that PHP is amateur is missing the point that PHP it’s a tool for the job. If amateurs use PHP you might get amateur results by the same token if professionals use it you get professional results, which is obviously the same as any other language.

Overall I think some of the questions or statements raised above are raised as a result of lack of understanding. As with most things in life some people scratch the surface of an area of interest and call themselves experts. The same experts make such judgements which create barriers for others. This could reading a text titled ‘Learn PHP in 24 hrs’ then calling oneself an experienced programmer or taking your driving test after a couple of lessons in a controlled environment and calling oneself an experienced driver confident enough to race with the likes of ‘Jenson Button’ and expect to win. Personally I have been using PHP for over a decade now and I am still learning new things everyday, particularly through exposure of different implementations. The language is moving fast with PHP6 arriving soon as well as many new and exciting related projects becoming available such as the array of frameworks which provide common interfaces to integrate with many different technologies. I would encourage anyone to look under the bonnet and get to know PHP in more depth and hopefully you will see the true power and capabilities of it.

, , , , , , , , , , ,

3 Comments

Woopra raises the bar for web statistics/analytics

I have been meaning to write a review on Woopra for some time, but wanted to try out Woopra for a while first to ensure I got more of an in depth experience whilst looking through the web statistics. It’s not easy for any stats package to get much attention with the likes of Google Analytics (which I currently use) to contend with, especially since most web statistics packages require the user to embed tracking code into sites which can impact page load times and is another stepping stone for integration. However I started to hear rumours there was a new kid in town by the name of Woopra and decided to give it a chance. I proceeded to set it up on this blog and another e-commerce site for a varied user base.

Live Statistics

One thing which stood out straight away using Woopra over other analytics packages was the ability to view live statistics from actual users on the site. I have to say I was a little pessimistic about this feature, having used similar features in the past. I was expecting, inaccurate details, delays and it being riddled with bot visits which would dilute the overall detail. To my surprise it was quite the opposite. I accessed the site from several locations using various devices, browsers and OS’s, then tracked my movements through the sites. Each time, it managed to detect my exact entry point to the site, the referrer I used (including the search engine search term) as well as my exact OS and browser. As soon as I started using this feature my mind was full of ideas where this feature could be a benefit to a website. My first reaction was that I could use Woopra to quickly identify bottlenecks in a system. By watching the flow of users through a site live, I could see any issues on a granular level. This could be very beneficial if you have changed a stage in a process, for example introduced or altered a stage in the checkout process. This feature will allow you to identify such areas quickly on a per user bases and could even be integrated with customer support to get more detail from the user allowing you to offer a better service at a time of need. You can offer a very proactive approach to usability and navigation by using such a feature.

Analytics Reporting

Looking through the quality of the statistics Woopra gathered through the live user tools as well as the historic analytic reports I was very impressed by the level of detail offered by Woopra. I did not see any evidence of bot contamination in my visit stats. I compared some of the analytical data Woopra had collected over a given time period with Google Analytics. I noticed that there were concerning differences in the details. To cross check both these I examined the actual access logs on the server to quickly identify which system was more accurate for example, by looking at the number of unique agents, visits and referrers. To my surprise the analytics seemed to favour Woopra in some cases although not all. There were areas of concern I noticed in Woopra particularly relating to the source by IP of the visitors. Although IP by Country seemed fine, I wasn’t confident that the IP to City locations were accurate and hence this affected some features which heavily integrated such data. Woopra had confirmed though the IP database being used in the beta program was being replaced and the current solution was temporary included due to financial constraints :

“We’re working up upgrading the IP address system. To save money, we went with an older, free version.” (twitter.com/woopra)

There were some differences where Google Analytics offered some data that Woopra doesn’t. However what I must say is where Woopra offered the same information as Google Analytics, I personally think Woopra presents the data in a more concise, detailed and purposeful manner. I started to find I had more interaction with the statistics offered on Woopra which allowed me to see some of the collected data in new ways. The level of detail shown particularly around referring domains and search terms in Woopra is excellent. You can instantly see a visual representation on a search phrase with the graphical detail helping you identify patterns and trends quickly. However there are areas which I didn’t test in much detail and that was based around PPC campaigns and such. It would be interesting to see what dedicated SEO specialists think of Woopra where PPC is heavily integrated into analytical campaigns.

Desktop Application & User Interaction

Analytics aside I was also very impressed with the desktop application to which I was using to retrieve statistics from my sites. The application is fast, well designed and offers a broad range of tools and filters which you can use to customise and extract data with. Since I have installed Woopra on my desktop I have actually found it to be quite addictive. It’s so accessible and easy to interact with I found myself constantly switching back and forth to find out more information.

Customer Feedback

As I have been testing Woopra out as part of the Beta program, I have been tweeting some of my finds on twitter. What impressed me was Woopra’s dedication to respond. I can confidently say that pretty much every tweet I mentioned, I had a direct response from @woopra with a constructive answer. This to me shows great product support and commitment by Woopra to make a strong product even stronger. This feedback and interaction process could really help Woopra get into a good market position quickly and I’m sure will also help the product develop into something the users really want.

Overall

To conclude this review, I was overall very impressed with Woopra. I would highly recommend anyone using or considering web statistic packages trying this out! The only issue I have left before fully committing to this package relates to the fact that this product is in beta and the final package price to my knowledge has not yet been released. Hopefully by spreading the word this could help reduce the price as I certainly want to carry on using Woopra. Watch this space, I think Woopra is going to be around for a good while!

Please feel free to add your comments to this post, I appreciate all feedback.

To find out more visit : http://www.woopra.com/

You can also follow Woopra on twitter at http://twitter.com/woopra

, , , , , , , , , ,

3 Comments