Archive

Archive for December, 2008

pdnsd – Decrease DNS response time and save bandwidth

December 25th, 2008
Comments Off

Sometimes, when you realize that you could have improved the system with so little effort, we blush. This is what happened to me when I realized that most of the neworking delays could have been avoided with this tiny but wity utility. I knew that having a local caching DNS or the like is the answer but I did not want to use a full fletched DNS server. I found pdnsd – a small proxy DNS server with permanent caching. Perfect!

In a nutshel, pdnsd is a small utility that caches DNS translations locally on the HD, hence next time the server queries the address the response time is likely to be minimal. Usually, the server has to query your ISP’s DNS or whatever DNS server you specified in the /etc/resolve.conf file. In a high performing web servers you are constantly competing with other packets on the network or your network resources. This is a great advantage. By installing pdnsd you achieve the following:

  • Decrease the average DNS response time sharply!
  • Increase your server performance, especially if this server needs to communicate externally a lot like an eCommerce server which constantly needs to communicate with shipping and credit card servers.
  • Save on bandwidth.

Here is how you go about setting up pdnsd on a CentOS server:

1. Download the latest stable rpm:
go to pdnsd download page and look for your relevant rpm. For CentOS 5.2 64bit I got the latest version as of yesterday:

wget http://www.phys.uu.nl/~rombouts/pdnsd/releases/pdnsd-1.2.7-par_sl5.x86_64.rpm

2. Install the rpm:

rpm -i pdnsd-1.2.7-par_sl5.x86_64.rpm

3. Configure pdnsd to use your current DNS servers:

vi /etc/pdnsd.conf

Paste the following, of-course you should use your DNS servers instead:

server {
label="opendns";
ip = 208.67.222.222,208.67.220.220;
}

4. Start pdnsd and test that it is actually working

service pdnsd start
 dig @127.0.0.1 yahoo.com

If you get the IP, it is working. Notice the response time, if you try again you will see a sharp decrease in response time. My servers’ second response time is almost always between 1-0 ms.

5. Set pdnsd to start automatically on boot

vi /etc/default/pdnsd

Enter the following and save:

START_DAEMON=yes

Also make sure the daemon is set to auto start on boot. I use ‘ntsysv’, you can use chkconfig or whatever you are used to.

6. Set your server to use the pdnsd instead of your DNS servers

vi /etc/resolv.conf

Make sure that the first nameserver line is ’127.0.0.1′. Should look like this:

nameserver 127.0.0.1

7. Restart your network service:

service network restart

How do you know that it is working? try to use any script that needs to go outside to the network, like ‘yum update’. In most cases, you will notice that the second time is much faster. Enjoy!

LAMP: Linux Apache MySQL PHP, Performance Optimization, Web Application Hosting, Web Development , , , ,

A list of CMS and eCommerce systems that officially support jQuery

December 7th, 2008

Last updated: December 7th, 2008.

Recently, jQuery – the agile JavaScript Library – has reached a tipping point. Here is a list of CMS and eCommerce systems that our clients are most interested in and their status with regard to jQuery.

Systems where jQuery is officially supported:

1. Microsoft has adopted jQuery and will offer intellisense support in its dominant IDE: Visual Studio 2008.

2. Umbraco - an open source CMS now offers jQuery by default and using jQueryin Umbraco is a matter of adding a simple call in order to include the jQuery files in the page.

3. Drupal - is an open source CMS and Framework CMS, as of version 5 it offers jQuery streight from its core. There are plans to build a centralized jQuery plugin in Drupal version 7.

4. Typo3 - is an open source CMS Framework. Typo3 has a jQuery extension that allows advanced integration with jQuery.

5. DotNetNuke - an open source ASP.NET CMS. Since October 2008 DotNetNuke offers built in jQuery support beginning with version 5.

Systems where jQuery is not supported:

1. Joomla - seems to favor Mootools over jQuery. Here is an article on how to support jQuery within Joomla and avoid conflicts with other libraries.

2. Zend Framework – the leading PHP Framework following the MVC design pattern. A press release was issued in May 2008 announcing Zend Framework and Dojo partnership.

3. Magento Commerce – an open source eCommerce platform that is gaining huge market share in the eCommerce industry. Currently Magento Commerce supports prototype JS library instead of jQuery, but offers ways to integrate jQuery easily.

4. Zen-Cart - an open source eCommerce (competing with Magento). At the moment Zen-Cart is not supporting any JavaScript library in its core.

Other systems and their relationship to jQuery:

1. WordPress - an open source blogging software. Uses jQuery for its core functionality and is avilable for any third party plugin.

2. Ektron CMS400 – Ektron has an enterprise level CMS with advanced content editing features. Oddly enough, Ektron seems to have embedded their own version of jQuery in their code.

While jQuery seems to be favored the favored JavaScript library by many developers, it has yet to be declared as the default one for many projects and systems. I’ll be keeping this list updated in the following months. Let me know if there is a system that interests you and I did not list it here.

Content Management Systems, eCommerce, Ektron, Joomla, Magento, Web Development, ZenCart , , , , , , , , , , , , , , , ,

Can Magento and Typo3 be integrated? Yes, with TypoGento

December 4th, 2008
Comments Off

Magento is now able to connect to Typo3. The connector is called TypoGento. At the moment it is only version 0.1.0 and the demo did not show any sign of integration. But, if you ever wanted the best in ecommerce and the best CMS framework that are both open source and free – you got it.

Now, I also heard that Magento and Joomla will be integrated pretty soon. Any idea when?

Content Management Systems, eCommerce, Joomla, Magento , , ,

Securing Joomla! CMS based sites

December 3rd, 2008
Comments Off

Looks like turbulent water in the Joomla Security Forums, again. Let’s ignore this and focus on securing a Joomla installation:

1. Set the right file and folder permissions according to the Joomla guide:

Once your site is configured and stable, write-protect critical directories and files by changing directory permissions to 755, and file permissions to 644. There is a feature in Site –> Global Configuration –> Server to set all folder and file permissions at once. Test third party extensions afterwards, and carefully review the code of any extension that has trouble with such settings. Note: Depending on your server’s permissions, you may need to temporarily reset to more open permissions when installing more extensions with the Joomla! installer.

2. Think twice before installing an extension – do you really need it? Most security vulnerabilities come from third party extensions. Especially ones that are pre-release or ones that have not been updated lately.
3. Upgrade to the latest stable version of Joomla. The core team is hard at work for the community partly addressing security bugs and issues found. If you run a site based on an old version of Joomla – you are at risk because the security issues are well documented and available for anyone by exploring the tracker.
4. Change your admin username. Very basic security tip that is recommended for almost every server out there.
5. Avoid shared servers. Virtual hosting is great if you are not in a position to afford a VPS or a full dedicated server, but it is not secure.
6. Protect your DB. Use a user other than the root, and do not allow connections from outside the machine. Even better, block the MySQL port completely.
7. Use an SSL. Simple, when you login and submit your username and password without an SSL, the information is not encrypted between you and the server. Potentially dangerous for packet sniffing exploits or in todays world, if you decide to work from a WiFi/Hot Spot.
8. Separate your development from the production server. Avoid unclean code or left overs that may leave a back door.

9. Remove unnecessary files from the site: remove the XML RPC server part of Joomla if you are not planning on using it. This service allows desktop applications to post directly to the site. Essentially providing access via this protocol. And if you just moved the site from another server delete the zipped files, since they contain your passwords in an unencrypted form!

10. Monitor the logs for hack attempts. Who is trying to login to the administrator section when I was eating my turkey? :) you get the idea…

Content Management Systems, Joomla, Web Development , , ,

Google is on a diet!

December 1st, 2008
Comments Off

It seems like the search giant is going through some housekeeping: laying off 3,000 employees and shutting down over ten of its services. We know from our clients that the first thing in slow times is to shut down the advertisement dollars. I guess, easy to setup and easy to stop, all it takes is a click of a button.

Well, we are seeing the result. Here is a shortlist of the services that Google just stopped offering:

1. Lively – used to be a virtual world kind of like second life. No more.

2. Google Answers – similar to Yahoo Answers. No mas.

3. SearchMash – non Google branded experimental search for design purposes. Gone with the dinosaurs.

4. Page Creator – a simple way to create a simpleton website. Caput.

5. GDrive – allow online storage on Google servers. Negative.

6. Browser Sync – extension for FireFox to synch your browser settings across computers. Belly up.

7. Hello – online photo sharing integrated with Picasa. Dead.

8. SMS – send SMS to a phone from online. Departed.

9. Click to call – was used inside Google Maps. Extinct.

10. Send to phone extension – FireFox extension. Vanished.

11. Related Links – relating links between sites. Defunct.

Now, this is not to say that Google is no longer the search giant. I only suspect that this is a focus shift and we will eventually see many more useful tools and systems come out of Mountain View, CA. Google is still one of the biggest think tanks in the world and did I mention the largest cloud computing network?

Search Engine Optimization (SEO), Web Application Hosting, Web Development, Web-based User Interfaces , , , , ,