Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, May 19, 2009

The Nail in the Coffin

My experimentation with Solaris/OpenSolaris is over. Amid the uncertainty that the Oracle purchase of Sun Microsystems has introduced I got some advice at PGCon2009 today that put the nail in the coffin. I asked someone, what OS was the best for running PostgreSQL? His response was, "The OS you are most familiar with". That OS is GNU/Linux.

In recent years Sun has tried really hard to change the image of Solaris from old Unix to Linux killer (specifically RedHat Linux) to Linux like. To drive the point home, the newer releases of OpenSolaris use bash as its default shell. But it's not enough. The biggest problem Sun had with shaking it's legacy image is that it's still legacy. For example, there are about 5 different flavors of the ps command in a default Solaris install. Sun was fanatic about maintaining backwards compatibility. The problem with that kind of religious fervor is that all the mistakes of the past become a permanent part of the system and haunts it in the present. So if you are a newcomer to Solaris and there is no one there to hold your hand, it is difficult to figure out what is the best way to accomplish a task or the best flavor of a particular tool to use. In essence Solaris newcomers are acutely susceptible to The Paradox of Choice.

So for all the great technology that is in Solaris, the investment in trying to learn it just isn't worth the return right now because I can do everything I need to do in Linux in a fraction of the time and with less frustration (i.e., Solaris still doesn't have a decent package manager). And in all the cases that are important to me, Linux and it's applications run faster than the Solaris equivalent.

But although the nail is in the coffin I'm not going to say goodbye. Who knows, one day I may have to call upon the Cruel Tutelage of Pai Mei and once again embrace the way of the Sun (err ... Oracle).

Thursday, December 06, 2007

IDEA-7+Glassfish, First Impression

It's been years since I've worked with Java EE in any meaningful way. Back then it was called J2EE and my application server of choice was Resin because it was blazingly fast and allowed me to bypass all the J2EE crud --like EJBs, deployment descriptors, war files, ear files, etc-- and just get stuff done. Truth be told, I've always disliked J2EE. It just always smacked of self important (read as, Sun/Scott McNeally) bullshit to me. Sun and their "partners" (BEA, IBM, and others) managed to turn something as simple as serving dynamic content over HTTP into a multi billion dollar application server industry that hoodwinked a lot of people.

I made a conscious decision to avoid J2EE like raw broccoli when Caucho started transitioning from Resin 2 to 3. The transition was an abomination of galactic proportions. They completely redid the configuration system and did not provided any tools to move from the old version to the new one. And to guarantee that migration was a herculean effort, they provided documentation that was grossly incomplete and mostly inaccurate. But they didn't stop there. They were just warming up. The 3.0 release was beta quality software at best but was billed as production ready. The word went out that development on the Resin 2 branch had stopped and all development effort was going to be on 3. So any existing open issues (bug reports) against 2 was null and void and would be addressed in the 3 release. That may sound reasonable but it presupposes that 3 is usable in a production capacity. It wasn't. I spent weeks chasing deadlocks and other concurrency issues in the Resin code. So if you were a user that was affected by Resin 2 bugs you were asked to move to Resin 3 and since Resin 3 had even more bugs you were just fuc*ed. The final insult was, while Resin 2 made the J2EE stuff optional Resin 3 made it mandatory. I gave up on Resin 3 and went live with the 2.1.x and never looked back. That was over 3 years ago.

I recently started dabbling w/ J2EE again in a limited capacity. I needed to provide an HTTP interface to a server application I am working on and there was no way in hell I was going to try to climb the whole J2EE mountain just to provide HTTP access to the app. The simplest way I found to provide HTTP support was to embed Jetty and the simplest way to hook into Jetty's HTTP engine is via the Servlet interface. So though I'm using a servlet I really don't consider it J2EE.

As I said before, it's been approximately 3 years since I deployed my last J2EE app on Resin 2.1.x and they have just come due for upgrading. So the quest has been on to find an application server to replace Resin 2.1.x. Don't worry. This isn't going to turn into some long winded diatribe about all the application servers on the market and their pros and cons and yada yada yada. The truth of the matter is I've only tried one. Glassfish. I downloaded it yesterday minutes after 8PM and installed it at around the same time. My first impression can be summed up in one word, Wow!

The installation and startup was an absolute breeze. No config files in sight. The web based admin interface is simple and intuitive. I have yet to click on the help button for clarification on anything. There is also a command line interface that does everything the web based interface does. This is extremely cool because it means configuration becomes scriptable and thus can be completely automated.

There were only 3 pain points in my journey from getting the software to deploying a test servlet (that tests database connectivity). The first pain point was setting up the connection pool for the database. The JDBC drivers for PostgreSQL isn't bundled with Glassfish. The reason it's a pain point is because the configuration screen listed PostgreSQL as one of it's supported databases. It even prepopulates the Datasource Classname field with the correct PostgreSQL specific classname. So as a n00b, seeing all this, my default assumption is Glassfish comes with everything needed to communicate with the database. After a bit of head banging I finally turned to Google where I learned that I simply needed to copy the PostgreSQL JDBC driver to ${INSTALL_DIR}/domains/domain1/lib and restart the server.

The second pain point is not a Glassfish pain point but an IDE one. I've been using IntelliJ+IDEA for years --I'm using IDEA 7-- and this was the first time I've tried to use it's J2EE facilities. Pretty slick! Granted, my previous experience with this kind of thing is limited to emacs and nano on a Resin config file, so IDEA 7 to me, represents a major leap forward. I mentioned my bias because if this sort of thing is your day to day shtick, I hear Netbeans 6 provides an even better experience than IDEA 7 for Glassfish integration.

The first problem I ran into is understanding the difference between the local and remote configuration. It turns out local means IDEA manages the actual running of the application server. So if you already have it running, like I did, then local can't work with it. If you don't want IDEA to manage the running of the application server you have to use the remote configuration option. Remote seems limited to deployment only.

The third pain point is also an IDE one. This time I couldn't get deployment to work. This one actually pissed me off because the failure was silent on the part of IDEA. Without error messages how the hell am I supposed to know what's wrong? Fortunately, Glassfish is not the silent type. I nuked the Glassfish logs and restarted everything. After the deployment failed yet again I checked the log. This time there was a line in the log about a failed login attempt by the admin user. Finally, a clue. When I configured IDEA to work with Glassfish it prepopulated the username and password fields. My assumption was it was grabbing the data from the same place that Glassfish stores it. Wrong! The other clue was the number of asterisks in the password field was longer than the length of the new password --I changed the password from the default during the intial configuration of Glassfish--. Obviously, the problem was the password that IDEA was using was wrong. I manually entered the correct password and that solved the problem.

Other than those 3 minor issues IDEA+Glassfish has been a pleasure to use. I just hope Glassfish's performance lives up to the hype

Thursday, November 08, 2007

QOTD, 8 Nov 2007

As the amount of RAM installed in systems grows, it would seem that memory pressure should reduce, but, much like salaries or hard disk space, usage grows to fill (or overflow) the available capacity.

----Jake Edge November 7, 2007

Monday, March 27, 2006

Gentoo is back!

I'm proud to announce my return to the Gentoo colony with my acquisition of a dual processor dual core AMD Opteron 270 box. But it is not all gravy.

Normally I stay on the KDE side of the fence but my time spent in Ubuntu land has given me a new appreciation for the Gnome desktop environment. The Ubuntu team has spent a great deal of time and effort making Gnome and all the apps in the Ubuntu distro a seamless whole. In Ubuntu most of the time I couldn't tell where Gnome ended and the application began. I'm currently running XFCE 4 and if it wasn't so damn fast I would switch to Gnome in a heartbeat. But I'm finding it difficult to give up the instant response time of XFCE. It is really fast. Click on a button any XFCE button and boom! it opens instantly, no waiting. It is intoxicating.

Even more impressive is the startup time. Booting up to a KDE/Gnome desktop is like booting up twice, once for the OS and another for the desktop. With XFCE startup is a none issue. startx and 2.5 - 3 seconds later I'm completely in my desktop. My only real gripe w/ XFCE is it doesn't come with a built-in graphical calculator and I can't find a decent one in the portage tree.

Like I said before, it's not all gravy. The box's fans are loud as hell so much so that my apartment sounds like the tarmac of an airport as planes prepare for takeoff. Which means when I 'm not working I have to turn it off or else I won't be able to hear myself think. There are positives to this though. I can't hear my neighbors.

The walls in my apartment are paper thin and I've got probably the loudest most obnoxious set of neighbors. They are constantly fighting and yelling and banging on the walls. One of them has this habit of going into the hallway to talk on his cell and it drives me absolutely insane because the hallway acts an echo chamber to his already loud and irritating voice. Like I give a shit what he has say to whoever he has to say to. If I could get away w/ it I would do not nice things to him ;)

Wow! I have no idea how I got from talking about my Gentoo environment to piss and vinegar about my neighbors. I guess they really get on my nerves. Anyway, the bottom line is Gentoo is da bomb and I'm glad to back and now w/ my tarmac apartment my neighbors are a none issue so if something happened to them it wasn't me!

Saturday, February 11, 2006

Back to Gentoo

I'm going back to Gentoo. As soon as my ThinkPad Z60m replacement gets here I'm putting Gentoo on it. Ubuntu/Debian is just not my bag. Even though it's GNU/Linux it feels alien to me. I think I'm just spoiled. Gentoo forces you to know your system. It's not just a black box. I feel empowered by that. I can't tell you what Gentoo has done for my sysadmin skills, though I try to avoid system adminstration at every turn. I prefer to spend my paying hours coding.

My litmus test of a good distro is how easy is it to build and install your own kernel. Nuff said! Gentoo rocks fo' shizzle!