Porting C Code to Ruby June 22nd, 2007

I try to port fsplib C library to pure ruby library. What is FSP anyway? Quoting from the official site: “FSP stands for File Service Protocol. It is a very lightweight UDP based protocol for transferring files. FSP has many benefits over FTP, mainly for running anonymous archives. FSP protocol is valuable in all kinds of environments because it is one of the only TCP/IP protocols that is not aggressive about bandwidth, while still being sufficiently fault tolerant.” It is not popular option for file transferring protocol.

So why do you want to port it anyway? Because it is a good exercise for my ruby skill. I could use it as portfolio too. Another reason is I can use this as opportunity to contribute to opensource.

I decided to port it as pure ruby library rather than binding to C api because this library does need the performance but need more portability. This is second day porting the library. Here’s what I have learned so far.

Read the rest of this entry