Monday
28
Dec 2009

I love winter

(8:41 pm) Tags: [General, Life, Why I like...]

My 3 year old son was putting on his mittens and said “I need my snow hands”.

Nothing like a little snow to make you miss actual seasons

spacer

Popularity: 63%

Comments: Comments Off
Wednesday
10
Jun 2009

Code Coverage in Eclipse with EclEmma

(8:38 am) Tags: [Software, Projects]

I am fortunate enough to be working on a project where I get to start from a clean slate. I set up test cases using JUnit, and Eclipse runs them within the IDE easily. Next I wanted to know how well the unit tests were covering the code.

Enter EclEmma, an Eclipse plugin for showing code coverage. Simply add the update site of update.eclemma.org/ to your sites, and install/restart Eclipse. Next, run your test case with the EclEmma run button, and you get a report of code coverage. It even highlights the code in the Java editor to show no/partial/full coverage of a line.

This is the way an Eclipse plugin should operate. Great work, EclEmma team! Now, if it only tested a webapp… I know I can do it manually, but this simple ‘click here’ experience leaves me not wanting to do that.

Popularity: 75%

Comments: Comments Off
Tuesday
3
Feb 2009

Sum all numbers in a file

(11:06 am) Tags: [Software, Why I like..., How do I..., Sysadmin]

You HAVE to love the elegance of unix and the utilities contained therein:

awk '{ sum += $1; } END { print sum; }'

Popularity: 81%

Comments: (3)
Tuesday
27
Jan 2009

keepalived: who needs a redundant load balancer setup?

(3:31 pm) Tags: [Software, Why I like..., Projects]

I was recently tasked with some performance work for a client. Their production web application written in CakePHP was having serious speed/load issues, so I jumped in and took a look.

After some initial testing, I determined that the load balancer serving HTTPS traffic to 2 web servers was only allowing 10 requests/second through, while each web server individually would handle more than double that. I set up a simple SSL/mod_proxy using apache from my own colocated server, and the throughput jumped fourfold to over 40 requests/sec. After checking all was well with the hosting company’s rented load balancer, we decided to ditch it.

I set up a simple load balancing solution using the proxy capabilities of nginx, proxying back to Apache. I did this so I could be sure that the Apache config was untouched. After getting that set up, and seeing the performance come back to expectations, I was then asked by the client to make it redundant (with failover).

I did some quick research, and found keepalived, a small project that is part of the larger Linux Virtual Server project. The best config I found was actually found in docs for haproxy, ironic.


vrrp_script chk_haproxy { # Requires keepalived-1.1.13
script "killall -0 haproxy" # cheaper than pidof
interval 2 # check every 2 seconds
weight 2 # add 2 points of prio if OK
}

vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 51
priority 101 # 101 on master, 100 on backup
virtual_ipaddress {
192.168.1.1
}
track_script {
chk_haproxy
}
}

I modified the virtual ip address, and the check script to look for ‘nginx’, and bammo, it just worked, right out of the box.

I am pleased with the simple configuration of keepalived, and that is ‘just worked’.

Popularity: 93%

Comments: Comments Off
Sunday
25
Jan 2009

Book Review: Lighttpd by Andre Bogus

(2:39 pm) Tags: [General, Why I like...]

I was asked by PacktPub to write a review of their new book on lighttpd, Lighttpd by Andre Bogus. It has taken a while to get this one up the queue, but I was pleased.

Overall, the book is a great introduction to using lighttpd as a web server, and PacktPub has even allowed me to attach Chapter 10, Migration From Apache, for your browsing enjoyment.

Like all other PacktPub books I have bought, the book is on target with the title, and while they all have just a few editorial snafus, it doesn’t stop from getting the point across.

Comparing and contrasting to my own experience with lighttpd, I found I knew most of the book, with exception of the excellent chapters on Using Lua with Lighttpd (Chatper 12), and writing your own modules (Chapter 13).

If you are looking for a book to get you going on Lighttpd, this would be the one I would recommend.

Popularity: 75%

Comments: Comments Off
Tuesday
6
Jan 2009

sparse revisions in subversion

(9:38 am) Tags: [Software]

Finally, an easy way to keep the root folder checked out, but only check out a few subfolders.
svn co --depth=empty is the best new feature in svn 1.5, bar none. Check out more info here and here.

Popularity: 79%

Comments: Comments Off
Saturday
3
Jan 2009

DimDim mini-review

(12:14 pm) Tags: [Software]

We tried out a company conference call using DimDim yesterday morning, and here is a mini-review.

Pros

Cons

Looks like we will have to stay with our current crap solution that we have, because screen sharing is our 90% use case.

Popularity: 74%

Comments: Comments Off
Friday
2
Jan 2009

Tango Patch Day

(2:19 pm) Tags: [D Programming Language]

Today was my day for patching up Tango, and I managed to make a good dent in getting Tango working on 64bit with GDC. As of svn revision 4235, I am compiling and running my programs on 64 bit Ubuntu 8.10 with GDC and tango.

Now to go see if I can get Mango going on 64bit.

Popularity: 78%

Comments: Comments Off
Thursday
1
Jan 2009

WebSVN install

(3:59 pm) Tags: [Software]

Installed WebSVN this afternoon for the corporate svn repository, and from the first use, it is one fast little script.

We were using Trac in the past, but I feel for svn browsing, WebSVN is going to become the de-facto standard.

Install was simple, just unzip, copy the sample config to your own, and edit a few options.

Popularity: 74%

Comments: Comments Off

rsync backups with TeraStation

(11:41 am) Tags: [Software, Life]

I just successfully set up a backup for my laptop to the home TeraStation, using instructions I found here.

If you just generically want to start using rsync to do backups, there is a great resource here.

I am already backing up via SVN for the really important stuff, and SVN backs up to S3, so I am covered there.

At work, we are using JungleDisk Workgroup to back up home folders, and that seems to be working out fairly well.

It feels good to start the new year with a backup…

Popularity: 78%

Comments: Comments Off
Friday
21
Nov 2008

Full 1920×1200 screen resolution on Dell Latitude E6500 with Ubuntu 8.10

(2:23 pm) Tags: [Software]

I am temporarily stepping away from Vista after some lockups that can’t be diagnosed to software or hardware. I downloaded the ubuntu 8.10 CD ISO from the torrent, burned it onto a CD, and rebooted the laptop.

Install took about 15 minutes, after which I was up and running in Ubuntu. Great compatibilty work, congrats to everyone in the community that makes stuff like this happen for people like me.

Once booted into Ubuntu, I thought the screen resolution was a bit off, so I checked, and sure enough, my Latitude E6500 with 15.4 inch 1920×1200 screen was running at 1280×1024. I tried running the screen resolution utility, but to no avail.

I found this post showing how to get it working, and these are the steps that I followed:

  1. Open a terminal
  2. Type: sudo apt-get install envyng-gtk
  3. Once installed, type sudo envyng -t
  4. Follow the prompts (I installed the recommended nVidia driver)
  5. Reboot as it recommends
  6. The laptop now boots at 1920×1200 resoution natively. Beautiful!

Having been a heavy CentOS/RedHat user, I am looking forward to learning the ways of Ubuntu.

Popularity: 76%

Comments: Comments Off
Friday
14
Mar 2008

Comments working again

(6:56 pm) Tags: [General]

I had forgotten to re-enable the comments posting script when I started posting again regularly. If anyone has tried to comment and not been able to, I do apologize, it should be working now.

Popularity: 81%

Comments: Comments Off
Wednesday
12
Mar 2008

Why is D/Tango so fast at parsing XML?

(9:05 am) Tags: [General, Projects, D Programming Language]

I have been getting questions concerning the performance of Tango in the XML benchmarks I have been running, with people wondering how something that is not C/C++ could be so fast. “They must be cheating!”

This post intends to explain how D, and subsequently Tango, can perform so well, even against C/C++. To read more about D, please visit the home page for D - D Programming Language. Tango is an alternate ’standard’ library for the D programming language, with a design philosophy of building a great library, with extensive documentation, and providing the greatest functionality in the most efficient manner possible. How do they do that you ask?

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.