Friday, October 28, 2005

VMWare Rocks!

And it rocks really hard! Since I evaluated VMWare 5.0 I became completely hooked on it. To the point where I really can not conceive anymore (professional) life without it. I have it on my XP box running Linux Ubuntu and Windows 2000. Have played as well with other OSes with equally impressive results.

Here's an example of handy use. I was working on WebTst (topic for another post) and was faced with the problem. I had to try my code with different versions of an installed set of packages. Big pain in an typical scenario. Install set one, develop, test, once happy either deinstall set or reinstall OS, install set two, develop, test, once happy go back to set one to make sure is not broken. Of course same drill could be done with two machines with different configurations or two OSes on same machine. Paaaainfull. Enter VWMare. I simply install a fresh version of the OS, capture a snapshot, install set one of packages, take a snapshot, test, develop, once happy, revert to clean install snapshot, install set two of packages, test, develop, once happy can freely jump between snapshots with package set one or two....no more installs for me...

VMWare Snapshot Manager


Now *that* is pretty nice!

It's uses do not stop here, from different combos of browsers and plugins to different configurations altogether....

Now get this one: you can actually setup a server (e.g. Linux) running a database, with a server running in there (e.g. Tomcat running). Take a snapshot of this state. Mess whatever you want....even power off....once you revert to previous snapshot, you will be brought to the *exact* same state that you had when you took the snapshot....database state, servers running and all...again...pretty impressive...

The list goes on and on and on....

My (professional) life *did* change with it!

(My personal life not so much...VMWare still does not change diapers at 3:00 AM or does dishes...I'm hoping for version 6.0....)

Microsoft PDC 2005 Videos

Microsoft's PDC 2005 videos are available online at http://www.sys-con.tv/read/category/1238.htm. Lots of content available.

I have no prejudice against Microsoft technologies. I do believe the principle
of "each tool for it's job". Microsoft technologies do have its place and its use
and the latest .NET platform, languages and tools are way too cool! Just check
them out for a bit and let me know if you agree....

JavaOne Sessions, Java Posse Podcast

Yup. They can be found online at http://developers.sun.com/learning/javaoneonline/.
Worth taking a look....Found about their existence while listening to a Java Posse podcast.

Java Posse is the successor to the now dead JavaCast podcasts. Pretty interesting podcasts filled with Java news, reviews, tech discussions and experience sharing. This is a fundamental item on my iPod.

Wednesday, October 26, 2005

Experiments in Load Balancing and High Availability (Part 2)


The Architecture

<disclaimer>
Let me start by saying that this was just one possible solution...As I investigated and played with this a ton of other possible solutions popped up. This is just one solution I liked putting in place and that worked fine for me.
</disclaimer>

The following picture illustrates what I was trying to achieve:



The basic infrastructure and functional elements:

  • A firewall to isolate the internal network from the outside. In my testing, achieved by my trusty router with built-in simple firewall.
  • One main load balancer server. Responsible for picking up requests from end-users and directing to server machines available in the defined cluster of servers. Equipped with two network cards.
  • One backup load balancer server. Responsible for monitoring the main load balancer server and picking up for him in case of main load balancer server failure. Equipped with two network cards.
  • A cluster of servers ready to receive requests from the load balancer and ready to do the serious work to fulfill the requests and get the responses.
  • An internal network connecting all machines. In my testing, my five machines (would like to see this number grow!).
  • A dedicated network between main and backup load balancing servers to allow for more reliable and fast monitoring of load balancing servers.

The interactions:

  • A request coming from a user should come via the firewall (router) to the main load balancer
  • The main load balancer should then send over the request based on a configured heuristic to the appropriate server in the cluster.
  • The selected server should fulfill the request and send the request to the end-user.
  • The main load balancers constantly monitors the cluster to remove failed servers or add new added servers.
  • The backup load balancer server constantly monitors the main load balancer server to ensure that it is working, taking over the load balancing function if main load balancer server is detected to be down.

Redundancy of services is therefore present both at the server level and at the load balancing solution level. We should in this way achieve load balancing and high availability.

More to follow in the next parts on this subject:

  • Solutions for Load Balancing Layer, where some possible solutions are discussed, one in particular is presented in detail.
  • Worker Server Clustering, where a solution to a particular problem is presented.
  • Remaining issues

Tuesday, October 18, 2005

Experiments in Load Balancing and High Availability (Part 1)

Part 1: The issue

The questions have always been in the back of my mind "What if my site is just too overloaded ? What if it crashes ?"....not that it matters that much to my personal sites...It's not like I have millions of users.....or that the world economy would fall over if my personal sites were down or just too slow...But still....I always felt the urge to play with solutions to overcome any performance and availability issues with my sites (but I will not stop playing Halo to make my site more performing..not that!!!). So I started my investigation on the subject....What could I put in place to provide me load balancing and high availability on a site ? I bumped, not surprisingly, into a ton of solutions...From dedicated hardware to complex software solutions. But....this being kind of "I want to explore it" experience and since I am not really not into throwing a ton of money into the experience, my aim was directed into trying to make the best of the cheapest solution possible. And there began my quest...

I was very close to getting a cheap BIG-IP. But most of what I could find on eBay was typically locked out systems or incomplete systems. Other solutions outside eBay were just outrageously expensive. For my pocket anyway. So....off with the hardware box solution...next!

I then bumped into a pretty interesting project called Ultra Monkey. I started having hope finally that I might be onto something. I jumped again onto eBay and got me an extremely expensive set of hardware (yeah sure!)...Two Pentium III 500Mhz for the much more agreeable price of $80 for both...Armed with those two and with my two other more decent computers, a Pentium 4 2.6 Ghz and a Pentium 4 2.8 Ghz, I started then to elaborate on an realistic, usable architecture to make load balancing and high availability possible on a short budget.

Plans taking shape...Ultra Monkey doing the management of my application, I started to think about issues like back-end application distribution and synchronization. With my first goal being to get to a solution for a Java Web application I looked a bit more into books on Tomcat...and eventually found the way to implement Tomcat clustering behind any load balancing and high availability solution. That led me to the final piece of this puzzle. I now have a solution that convinces me that I can put load balancing and high availability in place....Working on my personal sites...my site users probably could not care less, but I now can finally put it to rest....

More to follow in the next parts on this subject:

  • Overall architecture
  • Solutions for Load Balancing Layer
  • Tomcat Clustering
  • Remaining issues

Friday, October 14, 2005

NetBeans 5.0 Beta

I have been looking at Eclipse for quite sometime but was never quite convinced by it (let the flames start). Seemed awkward to use and most of the functionality was not where I expected it to be. In addition to that, handling of pre-existing projects with rich, complex ant files seemed hard to say the least....Enter NetBeans 5.0...Using it with pre-existing projects has been a breeze...For starters there is right out-of-the-box a "create a project from ant file" which creates a project that not only gets bootstrapped from the ant file but keeps control in the ant file. Builds can still happen via the existing ant file with nice integration between the IDE and the ant file. All functionality is right where I would expect it to be making my life a lot easier and reducing immensely the effort of getting into a new tool.

As if that was not enough (for me at least), there are a ton of new features in NetBeans 5.0 which make it worthy to invest some time to evaluate. Matisse -- a WYSIWYG dialog editor, code completion, tighter CVS integration, tighter JUnit integration, support for Ant file debugging (how cool is that?!?!?), JBoss support (among others, I happen to be more interested in JBoss), deployment descriptor editors, easier plug-in development, AJAX solutions....and the list goes on.

If you do not want much time looking at the IDE itself, you can at least watch a small presentation on it:

http://www.javalobby.org/eps/netbeans5/

And new features are supposed to be coming in later after the final launch. As far as I'm concerned, this IDE works pretty nicely for me. Move over Eclipse, here's NetBeans 5.0.

Bumping my head on the wall

Yup. For anyone working in software development, sometimes it sure feels like bumping my head on the wall. Traps and pitfalls, tips and tricks, new tools, new processes, cool books, cool technologies, interesting and useful links. I'll keep adding them here.

If you have any comments or feedback, send them along!