Windows is Here to Stay 1

Posted by Toby Sun, 18 Nov 2007 19:10:00 GMT

According to Pankaj Ghemawat and Ramon Casadesus-Masanell of Harvard Business School free isn’t good enough to destroy Windows . I found this piece pretty fascinating as it is the first formal model of the Microsoft vs. Open Source debate that I’ve seen and there was plenty in there that was outside of the current zeitgeist. I had heard that Microsoft secretly loved piracy but I hadn’t really thought about what that would mean for Linux making inroads into China (implicitly referred to in the article). China is the biggest battleground for the Microsoft vs. Linux battle and pretty much the last one of any consequence in the operating system wars (barring a new kind of computational model, of course). It is pretty telling, though, that only two of the biggest Internet success stories of today are running Windows: eBay and Myspace. Shows where today’s developers heads are. Definitely give the article a good read.

Assholes: QSOL.com

Posted by Toby Tue, 17 Jul 2007 17:01:00 GMT

I just saw this in this month’s Linux Journal. It’s because of that kind of mysoginistic attitude that there are very few women in our industry. Fucking morons. How did this get past editorial? Guess who I won’t be buying Linux servers from?

Nettica DNS and Amazon EC2 1

Posted by Toby Tue, 26 Jun 2007 20:13:00 GMT

When I started using Amazon’s EC2 service I realized pretty quickly that the traditional load-balancing solution of putting a big, honkin’ F5 BIG-IP in front of the servers wasn’t going to work out. Amazon doesn’t currently rent F5’s ;)

So, I went looking around for a DNS-based load-balancing solution that would be flexible enough to deal with the dynamic environment that EC2 provides. However, I pretty quickly found that the existing dynamic DNS APIs of most of the providers were not up to the task of programmatically updating a DNS record the way I needed. Specifically, I wanted to be able to register and deregister an EC2 instance with a round robin A record automatically upon instance startup and shutdown.

In the end, I was only able to find one dynamic DNS provider whose API was up to this task: Nettica.

Once I found them, it was pretty easy to wrap their SOAP-based API into a binary to drive this type of dynamic management of my DNS records. Apache Axis took care of turning the WSDL into Java (the only library that could do so across three programming languages, by the way) and the code for driving that wrapper was pretty simple. The end result of that effort is now open sourced for all to use.

The way I use the new Nettica client is to have the init script automatically register an instance on startup with the Nettica service. However, I remove the instance from Nettica a bit before shutting down the instance itself in order to deal with DNS caches that sustain the now-removed IP for longer than the specified TTL value. You might be able to automate this by throwing a sleep LARGENUMBER into the shutdown portion of the init script, but I haven’t tried this yet.

In any case, I hope people find this client helpful when using EC2. I look forward to hearing about experiences with it and improving it for others. I’m planning for a release pretty soon to add support for RPM packaging, as most of the AMIs used today appear to be RedHat RPM based. Watch this space for updates.

Nettica DNS client for EC2 version 0.0.1 released

Posted by Toby Mon, 25 Jun 2007 17:57:00 GMT

I’ve just released by code to update EC2 instances on start up and shut down with the Nettica DNS service. You can find it here:

http://code.google.com/p/netticadns/

With this code, you can set up your EC2 instances to automatically register/deregister themselves with the Nettica DNS service on start up and shut down. There’s no RPM packaging at this point, but there is a dpkg available for it.

I’d appreciate any feedback or patches. Have fun with it :)

sipscreen v1.0

Posted by Toby Sun, 10 Jun 2007 06:27:00 GMT

My buddy mct just created an awesome little piece of software called sipscreen which allows you to filter out VoIP calls based on rules of your own choosing on your Linux gateway.

Here are some example call policy rules:

exit 1 if $name =~ /TOLL FREE CALL/i or $number =~ /^(800|877)-/;                                                                                                          
exit 1 if $number eq "000-000-0000" and $hour >= 3 and $hour <= 9;                                                                                                         
exit 0;

If you’re using VoIP and have it connected to a Linux gateway, you should definitely check this out. Its way easier to accept/reject calls than having to fire up a full Asterisk install.

Google Internals Talk 1

Posted by Toby Sun, 13 Aug 2006 21:47:00 GMT

I recently gave a talk to the Philly Linux User Group regarding the internal workings of Google’s infrastructure. The slides are available here. The presentation was created with S5 so all that’s required to view them is a relatively recent browser.

The talk was pretty well received. I was somewhat surprised at the interest in the material. I have never worked for Google, so I got all my information from their own papers and various other Internet sources. A considerable amount of knowledge is available just at their Google Labs paper index, although they seem to have pared it down in size recently.

ruby-sendfile 0.9.2 released

Posted by Toby Mon, 27 Mar 2006 11:53:00 GMT

As Zed pointed out , I made a lame typo in the 0.9.1 release which I have corrected in the 0.9.2 release . gem update or grab the new tarball if you’re using it.

ruby-epoll terminated

Posted by Toby Sun, 26 Mar 2006 13:20:00 GMT

The ruby-epoll project has been terminated. Due to the current state of Ruby’s internals, there is no way to implement the desired functionality without constantly conflicting with Ruby’s use of select(2) everywhere. Zed hit the same problem when he tried to write Ruby/Event , a wrapper for libevent for use with Ruby. A shame. I might try again when Rite hits.

ruby-sendfile 0.9.1 released

Posted by Toby Sun, 26 Mar 2006 13:08:00 GMT

Just released version 0.9.1 of ruby-sendfile. A lot of changes:

  • Added README and Changelog
  • Added full test suite
  • Works equally well now with blocking and non-blocking sockets
  • Passes all tests on Linux (x86 and AMD64, both 2.6.x) and FreeBSD.
  • Packaged into RubyGem, available on Rubyforge.org

Check out the main project page for files and forums and such, or just ‘gem install sendfile’ to get started using it. It should autoinstall the rdoc action (ri IO#sendfile) to see how to use it.

To get to 1.0, I will either test or have someone else test on Solaris, although it should work on Solaris as is. As well, I am thinking about allowing you to pass a file path instead of an open file as the first argument and just having the library open and close the file for use with sendfile(2). Also, I might allow you to pass a Range as the second argument, instead of having to use the offset and count parameters. Finally, I might investigate what it would take to support TransferFile() on Windows, but don’t anyone hold their breath. I will accept patches, however.

With luck, Zed might use this in mongrel to really speed up static file transfers.

ruby-sendfile 0.0.1 released

Posted by Toby Mon, 14 Nov 2005 18:56:00 GMT

I just released the alpha tarball of ruby-sendfile. The package gives you an interface for Ruby’s IO class to use the sendfile(2) system call on Linux, FreeBSD and Solaris. (not tested yet on Solaris, but should work)

By interfacing with the platform’s native sendfile(2) system call, ruby-sendfile provides a “zero-copy” way to transfer the contents of a file to the network. In this case, “zero-copy” really means as few copies as is possible.

Here’s a contrived example to bore you:

require 'socket'
require 'sendfile'

f = File.open( "sometextfileinthisdir")
s = TCPSocket.new( 'yahoo.com', 80)
s.sendfile( f)

This will send the contents of the file “sometextfileinthisdir” and send it to Yahoo!’s webserver. This will, of course, produce an error since what is in the file “sometextfileinthisdir” will probably not be a valid HTTP request, but hey, it got there, didn’t it?

I would appreciate someone giving this a go on Solaris and seeing if it blows up or not. Thanks.

P.S. I already know that there was a project also called ruby-sendfile on RAA, but its dead like Max Headroom, so I’m using the most obvious name for the project.

Older posts: 1 2