Why Open Source Java is Good News

I prepared some notes on a few topics and they weren’t used that much so I thought that I’d use them here as it’s been a while since I said anything useful on anything other than the miniutae of any particular issue.

So, Sun finally released the Java source code under the GPL. Great News. Why? Well, here follows a slightly rambled list of opinions on the topic.

I don’t use Java particularly. Not on the desktop or the server and most people don’t really care about Java applets that much any more, but Java is pretty popular on embedded devices such as your mobile phone to play games and TV set-top boxes. Which I would guess is Sun’s main source of revenue from Java and I believe will be unaffected.

The good news for the open source community is that we get a solid bunch of code that we’ve had to largely avoid in the past due to licensing and redistribution issues. We have a platform we can use at last which will be easy to install and redistribute. We can now run Java apps easily – the Azureus bit torrent client, Freemind, the Java components of Open Office.org, the Apache Tomcat server, Open Exchange which builds on Tomcat and so on. Not exactly a raft of Java applications, but then we’ve never had a Free and complete Java implementation before. Java has always been something which has been viewed with suspicion under Linux.

Not only is the Open Source and Free software community now free to install Java and Java applications, but we now have the possibility to use Java as a language and a platform properly for the first time. The Java community can now contribute optimisations and features that they’ve been waiting for, which will only make Java better and prevent it becoming obsolete on the desktop and in the server room in the face of .NET, Mono, PHP and Python. It also gives us a powerful application server engine.

One of the big cliffhangers for whether Sun would Open Source Java was whether it would be forked, leading to 2 or more incompatible, competing Java implementations. I don’t believe this to be likely in anything other than specific uses.

There are already several non-Sun Java implementations such as:

  • Blackdown
  • Kaffe
  • Classpath
  • IBM JDK
  • Others

Most people aren’t using them. The Sun implementation is the standard and reference implementation and who wants to use a non-standard version. Certainly, Blackdown and Kaffe have been around for a few years and latterly, Classpath and none have ever been complete or widely used.

The only likely scenario of a competing Java implementation being a threat to the Sun implementation is if the Sun implementation doesn’t give users what they want and who would be stupid enough to do that? Besides, this is the Open Source community, where you can submit your own features and extensions.
As I said, aside from embedded usage, server and desktop usage are Java’s other 2 main areas. Installation and redistribution have always been troublesome on Linux, as nobody can package it for you, you have to get it from Sun, run the installer script, wave goodbye to your ethics and then set up your path. Awkward and compromising. Or use an incomplete implementation or live without. Thats for your desktop, for the server, you probably can install it yourself and have your ethics wiped away by business needs or management decisions, but still these issues all made Java a more difficult choice on Linux and one which people weren’t keen to utilise or program with.

On Windows servers, you probably do everything in ASP.NET, on Linux you probably did everything in PHP, or more recently Ruby, Python or even Mono. Now we have Java too and we can use Tomcat and Jakarta. Java is at last now a viable option on the Linux desktop or for the glue in server applications.

Today I Have Been Mostly Irritated By…

…Stupid mail servers.

You see, while being a reasonably well balanced person, I tend to see through things quickly, particularly advertising, marketing, PR, promotions, special offers and those guys with the throwing games at the fair ground and shit songs, irritating adverts and crap, mindless TV programmes piss me off really badly so much so that I have to turn over the TV or radio to make it all just go away.

As you may have read here and here, I like tinkering with mail servers, there seem to be endless permutations to solving any number of problems. So, I implemented greylisting a few weeks back and it has worked well, I received compliments on how much the spam rate had dropped, in fact to pretty much zero. I estimate that at least 90% of email connections my main mail server receives are spam and we drop about 40% of that with spam blacklists, Spamassassin was pretty ineffective and caused problems under heavy load so I dropped it and replaced it with greylisting. Greylisting refuses every email connection the first time round and tells you to come back in a short while.

A core feature of mail servers is the ability to spool message to retry later. When the retry comes , if it is after a certain period of time, the mail server looks up in the greylisting table whether it has seen mail from you recently and if it has, lets the mail through. Simple huh? And a pretty common tactic. Most spam comes from virus infected Windows machines and the spam software on them (which you won’t notice apart from your Internet connection being slow) isn’t normally intelligent enough to handle retries, they are normally optimised for sending as much spam as possible, regardless of whether it reaches it’s destination.

So, what has pissed me off today is a client complained that they aren’t getting some mail. I look into it and find that in each case the sending mail server can’t handle retries. WHY NOT??? Because, probably, their administrators don’t know what they’re doing. In one case, I guess it’s a policy decision. That’s YOU Blueyonder, spam capital of the UK. But in the other case, it looks like a home hosted mail server run by people that don’t know what they’re doing.

In this case, I had to whitelist (that means automatically allow, for the non-techies) the servers in question to allow my customers to receive the mail.

So, aside from my other rants on the topic of mail administration above, if you run a mail server, make sure you can handle reties within a reasonable period, unless you have a specific technical reason not to. As a hint, make the first retry within 10 to 15 minutes and then another one after an hour.

Oh yes, in completely unrelated news, I have given up smoking again. Completely unrelated, as I say.

On the good front, it amazes me how useful David Watson seems to be. I’m almost certain I’ve never met him, but he seems to keep popping up with solutions to my quandaries. Such as here and here. And he’s a fellow bass player. Keep on being one of the most useful people in world dude :).

Woohoo!

I have finally gotten around to buying a Cowon iAudio X5 multimedia player. So, ogg audio and video playback on the move for me. I meant to buy one a while back but couldn’t squeeze the legacy money repository any tighter.

So, woohoo for me 🙂

Remote Power Control

I’m going to be putting some servers into a data centre and manage them remotely. That means power control and optionally an IP KVM. Does anyone know the best way to do this? Do I need an IP KVM? What do they do that would mean I use an IP KVM rather than a normal KVM, both if I had to visit or if I worked from home?

The options I’m looking at at the moment are either some kind of remote power control device, using servers like Sun X2100s with either ” Optional System Management Daughter Cards” or “Standard Service Processor with embedded LOM” which use IPMI. Or maybe regular Dell or other servers, with the same kind of cards.

Are these cards any good? Do they work with Linux. Will IPMI 1.5 do what I want or do I need IPMI 2? It’s a minefield I tell ya. Can anyone make recommendations for remote power control devices, or BMC manufacturers and suppliers? What is preferable? A card or a separate device? I don’t know.

Oh yes and all of these servers will be running Linux…

Greylisting With Exim

I recently trialled and then implemented greylisting on a few Exim mail servers, seems pretty straight forward when you know how to add it to the Exim config. I guess I ought to post that config snippet in case it is of use to anyone as it took me a few goes to get right. On Debian and derivatives you need exim4-daemon-heavy and greylistd. You will also need to add the Debian-exim user to the greylist group and ensure that /var/lib/greylistd/whitelist-hosts is group readable.

I use Vexim for added ease of use as most of the integration of Spamassassin and ClamAV is done for you and it provides a web interface to managing virtual domains and users. Therefore my config is different from the Debianised split config. I used dpkg-reconfigure exim4-config to tell exim to use a single config file.

Note the commented out line, this was necessary to make it work with my customised Vexim setup. Yours may well be able to use it so leave it in to start with. I put this in vexim-acl-check-rcpt.conf, which of course you won’t have unless you’re using Vexim, so you’ll have to work out where to put it. I guess I can make edits if people tell me the details.

Give /etc/greylistd/config the once over to make sure it’s set up how you want it, I set my retry period down to 10 minutes as I have users who have time sensitive emails. Also look at /var/lib/greylistd/whitelist-hosts to allow all of the machines you need to be allowed straight through.

With Vexim, you are also using SMTP authentication by default so it would be nice to allow your users through without having to find another means of not greylisting them. If you don’t use SMTP authentication you’ll have to find another way and take out the !authenticated = * line.

This is essentially taken from the greylistd /usr/share/doc/greylistd.

Due to problems with getting WordPress to format the code for me and not hide the backslashes, I have removed the actual config and instead point you to my wiki article on greylisting. Apologies for that.

There are extra bits of config that allow you to catch emails with no envelope sender address, but I’ve not set this up satisfactorily yet, so answers on a postcard.

Other links to Exim Greylisting are at the following:

http://www.debian-administration.org/articles/167

http://www.tldp.org/HOWTO/Spam-Filtering-for-MX/exim-greylisting.html (didn’t work for me)

http://spod.cx/blog/greylisting_with_exim_spamassassin.shtml

Do You Know Whats Wrong With My Guitar?

Ok, I said had a few “Dear Lazyweb”s. This is the second in the series.

I put my home ‘studio’ back together to work on Jokosher as I had moved my PC, laptops, guitars and amp to my parents house before I went on holiday in case I was broken into while I was away. I have been twanging away quite a bit since I got back and now a problem with one of my guitars is really starting to bug me.

My Telecaster seems to have a tuning problem, it’s something that I noticed shortly after I bought it and at first I just thought I wasn’t tuning accurately enough, but it has become quite apparent the more I play it. It’s not that it won’t stay in tune which is a common problem with cheap guitars, more that it is out of tune after it has been tuned.

Basically, on a guitar, you have the body, which is the large part, the neck, which is the long thin bit with the wire strips across it and the head which is the bit on the end of the neck with with the tuning pegs on it. The strings are wound around the tuning pegs (aka machine heads) and then rest on a thing called the nut which sits on the join of the head and neck. At the other end, the strings rest on something called the bridge before going through the tail piece to keep them in place. When you pluck a string, it vibrates between the nut and the bridge and the vibration over the length of the string result in the pitch of the note that is heard. On the neck, those wire strips that go across the width are called frets and when you put your fingers between them, it causes the string to be shortened and hence create a higher note as the vibration is over a shorter distance.

Now, the problem I have is that when the the strings are in tune and played open, ie not using any frets, the note is in tune. When you play the note at the 12th fret, the string is in tune. If that isn’t the case it means the bridge or string saddles need to be adjusted. This wasn’t the case at first on my Tele and I had to adjust the saddles but it didn’t solve the main problem. The problem is that despite being in tune when open and when ‘fretted’ on the 12th fret, 2 strings particularly, B and G are out of tune on the second and surrounding frets, which makes playing chords or notes near that fret sound ugly as hell. Which means the guitar has a serious problem and can’t be played properly.

The problem gets better nearer the 12th fret, but that isn’t the point. The only other thing I can think of is either a) the guitar is fucked and needs to go back, which is a hell of a shame, or b) the truss rod needs adjusting, which is the limit of my knowledge about being a guitar technician and also, is beyond my experience which means it needs to go back to the shop. The truss rod is a metal rod in the neck of the guitar to keep the neck from bending or folding altogether under the tension of the strings. Anyone who knows better than me is welcome to make suggestions.

Problems with Jokosher/Gnome Audio/ALSA/DBUS/Ubuntu Edgy

I’ve been helping test Jokosher again, just as we come up to the second development release, but sadly I seem to have a problem with Jokosher recognising my Creative Labs Sound Blaster Live 5.1 since upgrading to Edgy. It all worked fine in Dapper. Please help if you have any understanding of DBUS, Gnome audio and ALSA. I don’t know where to go from here. So for now I’ll have to use my limited spare time on trying to help the docs team.

On a side note, check Jokosher out if you are interested in Linux audio production, we’re always looking for developers.

Been Around the World

Well actually haven’t but it feels like I have. I only went to Cyprus but it’s been chaos since I got back. It’s been a while so here’s a rundown.

Went to Cyprus, the Turkish part. It’s really nice, very peaceful where I went but you can see the place is in the middle of (re)development. It has suffered from under investment since the split with the Greek side but you get a sense that they are suddenly becoming aware of the income from tourism. Most of the place seems to be either run-down and covered in patches of debris or is being developed as fast as you can see, there are homes and apartments being built everywhere. Still, worse than British workers, there seem to be 7 or 8 people doing construction job and all but one of them are watching the other one do something small and fiddly.

I turned 30. I didn’t celebrate other than go for a meal with my family. Not that I was pissed off or depressed at my passing youth, merely that I just couldn’t be arsed. I really don’t feel like going out and getting wrecked these days, which was pretty much par for course during my late teens and 20s. Guess I’m getting old, but I can neither afford to waste money in such a way, nor waste the day afterwards recovering and more often than not, the day after that too. Some of my best friends also turned 30. Happy birthday to Rich, Adele, Anna, Joan, my nemesis Felim Whiteley who all share the same birthday as me and are also not listening apart from Felim probably. Hope you’re well my man, oh and by the way, someone left you a message in my comments. I can mail you his address if you don’t already have it.

I started doing a CCNA, funded by work, this is kinda cool but it’s all theory at the moment. I’m looking forward to playing with routers and stuff. It’s a real struggle to find the time to get my work done, especially with 2 or 3 weeks to catch up on after my holiday but I’m almost back up to date.

My mobile phone seems to be a bit fucked. The signal has always been a bit weak at home, but I’ve had calls drop out without signal problems and SMS messages that didn’t turn up. If you sent me a message and I didn’t reply then I can only apologise. Worse than this is the fact that the screen is now fuzzy in the top half and it’s a struggle to read messages some times. Ahh well, I’m not going to waste money I don’t have buying a new one when I’ll get a new one in March. Still I gotta wait for about 4 months with a dodgy phone.

I reinstalled my Ubuntu desktop with Edgy, which was kindly released on my birthday. The main reason was to make a clean sweep as both me and Aq wondered in the when we upgraded to Dapper whether we had missed out on some of the wizzy bits and pieces by doing so; and also to put my /home partition on Linux software RAID so I could play with it.

At work I’m busy as always. Top projects are still Asterisk, which I’ve been away from for quite a while, but which may well become quite important and a few other things. I have a number of “Dear Lazyweb” requests coming up so may well be asking for your advice.

I also have to learn PHP which is going to be a challenge given that I’m already short on time and doing a CCNA. Anyone got recommendations for PHP5 books or courses? My employer would like a number of us to learn at the same time, in a semi-organised way.

Oh yes and I’ve been ill for the last week. I was in a bad way Sunday and Monday, went in to work for a meeting feeling lousy on Tuesday but have been getting better since. My throat is still really sore and my chest is heavy, I haven’t smoked since I’ve been ill and I’m having sleepless nights. Hopefully I’ll be properly recovered soon.

That’s all for now, no doubt I will think of more stuff to write after hitting submit and will then take another 6 weeks to write them out. Hope you’re all well you kerrazy kidz.