- Amazon Web Services Developer Connection : Mounting Amazon S3 as a File System in Amazon EC2 – This tutorial discusses how to mount Amazon Simple Storage Service (Amazon S3) as a file system in an Amazon EC2 instance
- TFO eServices Java Programming – JXPath Tutorial – JXPath is an Apache Commons library to query Java object trees using the well known XPath XML query language. Extremely useful stuff but not yet very well known, hence this tutorial.
- Techworld.com – VMware enters the Linux kernel – The next revision of the Linux kernel is to include a virtualisation feature developed by VMware, called VMI.
- Java object queries using JXPath – Java World – JXPath is such an object-query tool. It is an Apache Commons component that enables you to query complex object trees using the well-known XPath expression language.
- Spring-Loaded – Guice vs. Spring JavaConfig: A comparison of DI styles – With all of the excitement surrounding Guice lately, I thought it might be worthwhile to compare Guice with Spring JavaConfig. Both represent different approaches to annotation-based dependency-injection
Monthly Archives: March 2007
Daily del.icio.us for Mar 21, 2007 through Mar 27, 2007
- Enunciate Your Web Service API – From your source code, Enunciate will build a fully-documented, interoperable web application in the form of a web application archive (war file). A consolidated, annotated XML contract is generated at compile-time. Each service class is published as a SO
- Uni-Form – One Form to Rule Them All – Uni-Form is an attempt to standardize form markup (xhtml) and css, "modularize" it, so even people with only basic knowledge of these technologies can get nice looking, well structured, highly customizable, semantic, accessible and usable forms.
- sq1-struts2 – Google Code – ‘Apache Struts 2 from Square One’ is a training course designed for people who want to create Java web applications, not just quickly, but correctly. Training sessions include a technology primer and a coding exercise. This Project hosts materials used by
- Ultimate htaccess Examples | evolt.org – Here’s my list of the ultimate htaccess code snippets and examples that I use all the time.
- Dr. Dobb’s | Adobe Woos Web Developers With Apollo Alpha | March 19, 2007 – Apollo is something of an anti-AJAX: It brings elements of online interaction to a desktop client application. Like Flash, Apollo includes a free runtime that users will need to download to their PCs. Using Adobe’s free Apollo development kit, programmers
Website Performance and Optimization
A couple of months ago, I noticed that I was getting pretty close to using up all of my monthly bandwidth allocation for my server and that was a surprise. I run several blogs that get quite a few hits but I didn't think I was anywhere near going over my 250 GB allotment. So I decided to spend a little time to optimize my server and figure out the best way to utilize what I had and optimize it to get the most performance out of my little box. Jeff Atwood's wonderful blog entry about Reducing Your Website's Bandwidth Usage inspired me to write about my experience and what I ended up doing to squeeze the most out of my server.
I had done some of the obvious things that people typically do to minimize traffic to their site. First and foremost was outsourcing of my RSS feeds to FeedBurner. I've been using FeedBurner for several years now after I learned the hard way how badly programmed a lot of the RSS readers were out there. I had to ban several IP addresses as they were getting my full feed every 2 seconds – Hoping that was some bad configuration on their side but who knows. Maybe it was a RSS DOS attack :). After taking a little time to see what was taking up a lot of the bandwidth, I discovered several things that needed immediate attention. First and foremost was the missing HTTP compression. Looks like an Apache or PHP upgrade I did in the past few months had ended up disabling the Apache module for GZIP compression and so all the traffic was going out in text. HTTP Compression delivers amazing speed enhancements via file size reduction and most if not all browsers support compression and so I enabled compression for all content of type text/html and all CSS and JS files.
Some older browser don't handle JS and CSS compressed files but anything of IE6 seemed to handle JS/CSS compression just fine and my usage tracking (pictured above) indicated that most of my IE users were using IE 6 and above.
Enabling HTTP Compression compressed my blog index page by 78% resulting in a statistical performance improvement of almost 4.4x. While your mileage may vary, the resulting performance improvement got me on the Top20 column at GrabPERF almost every single day.
Another issue I had was the number of images being loaded from my web server. As most of you already know, browsers will typically limit themselves to 2 connections per server and so if a webpage being loaded has 4 CSS files, 2 JS files and 10 images, you are loading a lot of content over those 2 connections. And so I used a simple CNAME trick to create an image.j2eegeek.com to complement http://www.j2eegeek.com and started serving images from image.j2eegeek.com. That did help and I considered doing something similar for CSS and JS files but decided instead to outsource image handling to Amazon's S3.
Amazon's S3 or Simple Storage Service is a highly scalable, reliable, fast, inexpensive data storage infrastructure that is fast and relatively inexpensive. S3 allows you to create a 'bucket', which is essentially a folder that must have a globally unique name and cannot have any sub-buckets or directories and so it's basically emulates a flat directory structure. Everything you put in your bucket and make publically available is accessible via http using the URL http://s3.amazonaws.com/bucketname/itemname.png. Amazon's S3 Web Service also allows you to call it using the HTTP Host header and so the URL above would become http://bucketname.s3.amazonaws.com/itemname.png. You can take this further if you have access to your DNS server. In my case, I created a bucket in S3 called s3.j2eegeek.com. I then created a CNAME in my DNS for s3.j2eegeek.com and pointed it to s3.amazonaws.com. And presto – s3.j2eegeek.com resolves to essentially http://s3.amazonaws.com/s3.j2eegeek.com/. I then used John Spurlock's NS3 Manager to get my content onto S3. NS3 Manager is a simple tool (windows only) to transfer files to/from an Amazon S3 storage account, as well as manage existing data. It is an attempt to provide a useful interface for some of the most basic S3 operations: uploading/downloading, managing ACLs, system metadata (e.g. content-type) and user metadata (custom name-value pairs). In my opinion, NS3 Manager is the best tool out there for getting data in and out of S3 and I have used close to 20 web based, browser plug-in and desktop applications.
In addition, I also decided to try out a couple of PHP Accelerators out there to see if I could squeeze a little more performance out of my web server. Compile caches are a no-brainer and I saw decent performance improvement in my PHP applications. I blogged about this topic in a little more detail and you can read that if you care about PHP performance.
The last thing I did probably had the biggest impact after enabling HTTP compression and that was moving my Tomcat application server off my current Linux box and moving it to Amazon's EC2. Amazon's EC2 or Elastic Compute Cloud is a virtualized cloud of computing available to you for $0.10 per hour of CPU utilization. I've been playing around with EC2 for a while now and just started using it for something real. I have tons of notes that I taken during my experimentation with EC2 where I took the stock Fedora Core 4 images from Amazon and made that server into my Java application server running Tomcat and Glassfish. I also created my own Fedora Core 6, CentOS 4.4 image and deployed them as my server. My current AMI running my Java applications is a Fedora Core 6 image and I am hoping to get RHEL 5.0 deployed in the next few weeks but all of that will be a topic for another blog.
In conclusion, the HTTP Compression offered me the biggest reduction in bandwidth utilization. And it is so easy to setup on Apache, IIS or virtually any Java application server that is it almost criminal not to do so. 🙂 Maybe that's overstating it a bit – but there are some really simple ways to optimize your website and you too can make your site hum and perform like you’ve got a cluster of servers behind your site.
Daily del.icio.us for Mar 19, 2007 through Mar 20, 2007
- OpenLaszlo 4.0 Released | OpenLaszlo – OpenLaszlo 4.0 is the industry?s first and only RIA platform to support the development and delivery of applications in both Ajax and Flash®, all from a single code base
- Only Ubuntu Linux: Upgrade Ubuntu 6.10 (Edgy Eft) to Ubuntu 7.04 (Feisty Fawn) – Ubuntu 7.04 is the current development version of the Ubuntu operating system. It is to be released in April 19th 2007. We can Use Two methods to upgrade Ubuntu Edgy to Ubuntu Feisty 1) Using GUI 2) Using apt-get
- The Real Lesson of Flex – In addition to being a rich-client development toolkit that targets the Flash virtual machine, an interesting aspect of Flex is that it relies on code-generation to reduce the amount of code a developer has to write by hand
Daily del.icio.us for Mar 17, 2007
- SXC – Simple XML Compiler – SXC (Simple XML Compiler) allows you to created optimized parsers and writers for XML. Through a declarative API you’re able to tell SXC what type of XML to expect and what actions to associate with it.
- On the Stre@m – Flex has become more accessible – The Flex module for Apache and IIS provides web-tier compilation of MXML and ActionScript files on Apache and IIS web servers.
- Assessing the Survivors of the Java IDE Wars – For enterprise development, I’d say IDEA wins out with its rich support for both J2EE and Java EE 5, followed closely by NetBeans (which also does an impressive job here), and last is Eclipse/MyEclipse (mostly due to their current lack of support for Java
- An XQuery Servlet for RESTful Data Services – This paper shows how to use XQuery for data integration, and how to expose an XQuery as a RESTful data service using a Java servlet
Daily del.icio.us for Mar 10, 2007 through Mar 15, 2007
- video.onflex.org – video.onflex.org is maintained by Mike Chambers and Ted Patrick of Adobe. It is focused on providing videos about developing with Adobe Flex, ActionScript and Apollo.
- How to Use Java at a Startup – Cardsharp on Software – The embarrassment of riches in the Java Open Source movement makes it a slam dunk for startups. The fact that you can find an Open Source framework for every conceivable use means that you can focus on your core business instead of on plumbing
- InfoQ: JP Rangaswami on open source in the enterprise & the future of information – CIO JP Rangaswami explains how open source became a corporate IT strategy at investment bank Dresdner Kleinwort Wasserstein and why CIOs of major enterprises should open source for software development initiatives. JP also explains his vision of four pill
- Ajaxian » Compressed versions of Prototype – John-David Dalton has spent some time compressing Prototype in a couple of ways to keep your download time to a minimum.
Daily del.icio.us for Mar 09, 2007 through Mar 10, 2007
- Ajaxian – Compressed versions of Prototype – John-David Dalton has spent some time compressing Prototype in a couple of ways to keep your download time to a minimum.
- SDN Channel – Spotlight on Open Source – Did you know that Sun contributes more than $200 million per year of intellectual property to the open source movement, in dozens of open source projects? The company?s historical contribution tops $2 billion (Kudos to Sun)
- www.hungtang.com – Java and IDEA: deadly tandem – I have been doing Java development for about 6 years now. It?s amazing to think that I have stuck with it for this long but I strongly believe Intellij IDEA has a lot to do with my seemingly never-ending devotion. Simply put, this product rocks?just l
- FiveRuns – Web 2.0 Systems Management – FiveRuns makes monitoring, analyzing, reporting and predicting the behavior of critical business systems painless.
- A Roundup for “Developers, Developers, Developers…” – So, I decided to make a compilation of products that developers may find useful. There?s a little bit of everything in here – some are still in private beta, but still worth mentioning
Daily del.icio.us for Mar 07, 2007 through Mar 08, 2007
- Spotlight: Michael Oxley – International Herald Tribune – Knowing what he knows now about the cost and effects of the law, would Oxley – who retired in January after 25 years in Congress – have done it any differently? "Absolutely," Oxley answered. "Frankly, I would have written it differently, and he would have
- Adobe edits the development cycle | Reg Developer – The change we made was going from a traditional waterfall method to an incremental development model. Probably the most effective thing we did was institute per-engineer bug limits: if any engineer’s bug count passes 20, they have to stop working on featu
- JetS3t ? An open source Java toolkit for Amazon S3 – JetS3t is a free, open-source Java toolkit and application suite for the Amazon Simple Storage Service (Amazon S3). The JetS3t toolkit provides Java programmers with a powerful yet simple API for interacting with S3 and managing data stored there.
- Six cool things you can build with OpenID – Apart from explaining what OpenID is and how it works, the key point I was trying to get across in the talk was that OpenID is a simple piece of infrastructure on which smart applications can be built?applications that may not have been possible prior t
- Flash Demo : Matisse++ ? (cld.blog-city.com) – Roman Strobl has a very cool new Matisse flash demo. It makes use of the new Swing Application Framework and Swing Databindings. If you ever wondered about Matisse++ or what happens after Matisse then you should take a look at a very cool NetBeans 6 and a
Daily del.icio.us for Mar 05, 2007 through Mar 06, 2007
- Coding Horror: Reducing Your Website’s Bandwidth Usage – What can we do to reduce a website’s bandwidth usage?
- Amazon Web Services Developer Connection : Building a Struts-Based Web Application on Amazon S3 – This article provides a tutorial on integrating the Amazon S3 REST API for Java with the Struts web application framework to create a web management user interface to the Amazon Simple Storage Service (Amazon S3).
- AJAX Magazine: Why Can Google Not Eat Its Dogfood, While Yahoo and Microsoft Do? – What’s surprising is that Google is not using GWT for its critical online service, which almost all of them are AJAX-based or have AJAX veneer: GMail, GMaps, GReader, GDocs, GSpreadsheet, GAJAX-Search, GFinance, GHomePage, … none of them use GWT! The qu
- 0xCAFEBABE – Securing Spring WS Client with XWSS – In this post, I will show you how I used XWSS to add WS-Security support to web services invocations. I used XWSS 2.0 from jwsdp-2.0. I had to add xmlsec.jar from the jwsdp-shared/lib in order for the example to work.
- Tableless forms – Another nice CSS stylesheet for styling forms without tables
- Getting Started with Google Code Hosting, Subversion, and TortoiseSVN without feeling like an Idiot « //engtech – Getting Started with Google Code Hosting, Subversion, and TortoiseSVN without feeling like an Idiot
- Starbucks’ ‘venti’ problem – Los Angeles Times – Time and again in recent years, we’ve seen small, cutting-edge and quirky brands gain critical mass ? only to lose their charm and customer appeal after they engage in breakneck expansion.
- When is Scrum not Scrum? (Agile Advice) – Tobias mentions that one must insist on agile engineering practices when doing Scrum. There are two problems with this.
- Agile Thoughts » Blog Archive » When is Scrum not Scrum? – I teach what I know works and what I see as being appropriate; there are slight differences in each context of course, but there are certain practices I have found to be effective, all of which differ from standard Scrum practices
- coded ruminations – Selling Agile, a Smell? – The use of Agile must be adopted using an iterative incremental approach – a nimble approach – an Agile approach. Agile is not to be sold, it is to be used.
Daily del.icio.us for Mar 02, 2007 through Mar 04, 2007
- Rich Internet Applications with Adobe Flex and Java: Secrets of the Masters – This book is a practical course that takes you into the world of real-life RIA applications. We also provided open source components and libraries that we hope will help you in your own development.
- IntelligentEnterprise : Debriefing: Adobe’s Jeff Whatcott Explores the Rich Internet Apps Trend (printable version) – Macromedia is credited with coining the term "Rich Internet Applications," so who better to comment on the future of enterprise apps than Macromedia veteran Jeff Whatcott. Now senior director, product marketing in the Enterprise & Developer Solutions Busi
- Body Language: A Key to Success in the Workplace : Yahoo! Finance – Body Language: A Key to Success in the Workplace
- Ted Leung on the Air » Blog Archive » Adobe wants to be the Microsoft of the Web – I guess we can only hope that Adobe?s experience with Tamarind warms it to the benefits of a more open model for the future of Flash. Sun has finally woken up, so maybe it?s not impossible for Adobe to either.
- Writing Better Code: A Conversation With Sun Microsystems Technology Evangelist Brian Goetz – Meet with Brian Goetz, author of the book Java Concurrency in Practice to get his thoughts on Java technology performance challenges, Java Platform, Standard Edition 6 (Java SE 6), common performance hazards, the challenges of moving from C to Java progra
- FlickrBlog – Beautiful Madison, Wisconsin – "What city has the most active Flickr group? New York? Chicago? Nope. None of the above. Of the top 100 cities in America, the San Francisco, Seattle and Madison, Wisconsin Flickr groups have more members per capita than any other city in America. Madison
- IT-eye » Flex the next Java? – There seems to be some similarity with Java. Not that Flex will replace it, but Flex might become the Java for RIA?s for Companies who do not want to rely too much on Microsoft