Tech Projects

2008.04.12

Mod_rails saves the day?

Hosting has always been the weakest aspect of Ruby on Rails. You can't simply upload a set of files and expect them to run, as you can with PHP thanks to mod_php. FastCGI is flaky (I'm still trying to escape it at work). A proxied pack of Mongrels is great when given a dedicated server and enough care and attention, but awkward and demanding on shared hosting.

Phusion's Passenger, an Apache module also referred to as mod_rails, looks as if it's exactly what many people have wanted: upload a Rails application to web host using Passenger and it just works. Passenger looks after managing your application for you, restarting it and spawning new backend processes as needed. It's even easy to install - just type gem install passenger and then tweak your Apache config.

I'm not going to switch my production services at work to this for quite a while, in fact, as they're hosted on a dedicated box there may be little benefit (and Mongrel looks like a better fit) but if it performs as advertised it should be enormously useful for web hosts, ISPs and universities. The issue of RAM usage remains, but that isn't a problem only for Rails apps.

Well worth watching.

Link: Phusion Passenger (a.k.a. mod_rails)

2008.01.31

JRuby on Rails

JRuby started off looking like a novelty project with little practical use, but in less than a year it's become a practical tool, something with definite advantages over it's more established rivals. IBM, Oracle and Sun are already using it themselves for web apps. Netbeans 6 has rather good support for Ruby built in, and much as I cringe when running Tomcat servers (from a sysadmin's perspective) from a developer's point of view .war files are a definite advantage.

This article describes what happened when some of Sun's Java web developers chose to try JRuby and Ruby On Rails.

I think JRuby is going to do very well in 2008.

Link: Igor Minar's Blog: JRuby on Rails Rewrite of mediacast.sun.com Launched

2008.01.18

Did We Just Win?

AOL, owners of the AIM and ICQ instant messaging services, may at long last be opening them up properly, using XMPP. They've got a beta/test XMPP service running (which is a good sign) but haven't announced anything yet. I think we've definitely passed the tipping point now. Google set a good example.

This is very unlikely to mean that AOL's dropping its own proprietary protocols, or even encouraging the use of XMPP over their own: AIM has some features that aren't yet present as standards in XMPP. It's possible that they could implement their own extensions as Apple has done, or they may simply implement XMPP as an alternative connection method and gateway to the XMPP Federation. No doubt they'll be some official announcement soon - the news has reached Slashdot.

I've not been active in the Jabber dev community for a couple of years now, but I'm still an enthusiastic user, and this makes me gleefully happy.

Next: Yahoo and Microsoft. Who'll give in first?

Link: AOL adopting XMPP aka Jabber

(In other news The USA's Marines Corp have adopted XMPP too, and Jabber/XMPP is nine years old already.)

2007.12.19

Happy Birthday Perl!

Perl is 20 years old today, and Perl 5.10 has been released, the first major new version for five years. Read Perl 5.10 for people who are not totally insane for a summary of the neat bits.

I can't mention Perl without feeling compelled to mention Ruby (the guilty conscience of a lapsed Perlist - I spend much more time with Ruby nowadays) so I'll add that Ruby will be 15 next year, a couple of years older than Java.

2007.05.16

Power

The lights at home did some disturbing flickering last week, so I've started thinking about replacing my dead UPS.

A basic UPS can handle about 400w. My PC's power supply can provide up to 450w, but how much does it actually use?

I've now got a gadget that connects between a plug and mains socket and gives a live reading of the watts being consumed. Power usage on the PC ranges from 90w to 120w. It was fascinating to see power consumption rise while email was being downloaded. We tend to think of the virtual activity within computer networks being completely distinct from the real world, but in reality even an email attachment has a carbon footprint.

There was one disturbing discovery. The PSU is a recently bought Antec HE, an ATX2.2 'high efficiency' power supply. It gives off less heat, and has an 85% efficiency. This is all very good, and might well account for the lower than expected power usage. Unfortunately the power meter showed that when the PC was turned off using the soft-power button, and should have been almost completely off, it was still consuming 20w! Twenty watts is quite a lot of power for what I assumed was a small circuit to detect a powerup request. To put it in context, a Nintendo Wii games console uses less than 20w when being used to play a game. The PC was doing nothing.

I normally avoid 'standby' modes and had no idea I was wasting so much power. I've now set the PC to boot when 'power is restored' and then switch it off at the 'hard' switch too.

2007.01.09

Not much on AppleTV right now

The AppleTV gadget looks neat and has a good price but a closed product tied to one supplier of content isn't going to tempt many people until it has some actual content. The UK iTunes store currently offers 0 TV shows and 0 movies.

I can buy* "Tin Toy" and a few other Pixar shorts for £1.89 each, but so far that's it.

Of course, if the AppleTV box can run MythTV I'll be queueing up to get one. It's good value at £200 just as a remote iTunes node, even without the video features.

(*Buying DRMed products isn't really buying in the traditional sense, of course. You just borrow them from Apple)

2006.12.03

‘Tis The Season

The Perl advent calendar is an old favourite of mine. This year I've found Ruby and Catalyst calendars too. Daily tips and tricks await at:

2006 Perl Advent Calendar

Catalyst Advent Calendar 2006

Ruby Advent Calendar 2006

2006.11.27

A/UX

Apple Unix (A/UX) is Apple's port of Unix to the original Macintosh. Specifically, it's a port of AT&T Unix System V.2.2 (with a handful of BSD-extensions) to Macintosh systems that were based on the Motorola 680x0 line of processors. You might be asking, "Another port of Unix... What's so special about that?" Well, A/UX combines the stability of Unix System V with the friendly graphical-user-interface (GUI) of the Macintosh Operating system. This hybrid-environment allows you to run both Macintosh and Unix programs on a single system. Sounds vaguely familiar, doesn't it?

Everything you ever wanted to know about Apple's first UNIX I might give this a try if it'll run on my old LC475.

2006.11.25

Apart from the maths and physics involved, yes, they are the same.

Judith Davies, who has a daughter at the school, said: “Many people campaign against mobile phone masts near schools, but there is a great deal of ignorance about wireless computer networks. Yet they are like having a phone mast in the classroom and the transmitters are placed very close to the children.”

Health fears lead schools to dismantle wireless networks

Scientific evidence is inconclusive, but some researchers think that children are vulnerable because of their thinner skulls and developing nervous systems.

Wifi uses the same signal as baby monitors but unlike baby monitors the signal is not constant. The wifi units are also further away from users than baby monitors are from babies (I believe baby monitors are usually fixed to cots). Babies have very thin skulls. As far as I know the "Exposing Large Numbers Of Babies To 2.4Ghz Microwave Radiation" experiment puts us all in the clear so far.

Given the almighty faff I've been having with wireless networks recently they should go with a wired network because it's going to work.

If there's one thing worse than people who can't discriminate between different forms of radiation it's Netgear wifi bridges that kill TCP connections and Linux wifi drivers that have a mind of their own. :-) Unfortunately A. isn't keen on me taping cable over the walls or pulling up the new flat's floor yet, and she has a point.

2006.11.18

Ruby On Everything

There's been a lot of hype this year about Ruby 'replacing' other programing languages and seducing their developers. I think this has masked something far more interesting and much less confrontational: different programing languages are getting much better at working together.

Ruby runs on its own dedicated interpreter but recently there's been a lot of activity on porting the language to run on VMs predominantly used by other languages, specifically the Java JVM, .Net's CLR and Perl6's Parrot. There are also 'bridges' that let a non-Ruby application embed a traditional Ruby interpreter. Either method allows developers to mix and match other languages with Ruby.

The main JVM effort (JRuby) is going well:

Sun hires JRuby developers

Ruby running in a Java applet

Ruby on Rails almost running properly within Java

Deploying Ruby on Rails inside Glassfish

And the Ruby Java Bridge lets you use Java classes from within traditionaly executed Ruby apps.

It's even possible to extend Java classes using Ruby

Microsoft's .Net developers can join in the Ruby fun too:

Microsoft hires Ruby .Net developers

There are at least two working .Net compilers for Ruby: Ruby.Net and Iron Ruby.

There's a Ruby bridge for .Net too, called Ruby CLR

Perl's Parrot VM was the first to talk about re-implementing Ruby and promises great things but sadly has made relatively little progress. Of course, Perl6 itself is taking its time too.

The current Parrotised Ruby is Cardinal. One day Parrot will allow you to build an application from a mix of various languages, including Perl 6 and Ruby, all snuggled up together.

Perl being Perl, there is of course a Ruby bridge for Perl 5.

My Photo

Campaigns

Photography

  • My Recent Flickr Photos
    www.flickr.com
    BinaryApe's photos More of BinaryApe's photos

Tip Jar

Change is good

Tip Jar