Saturday, January 27, 2007

Windows is driving me to the bleeding edge...

of my sanity. Did you know that Ruby's green threads on windows are worthless? Ok, they aren't completely trash, I mean, they do indeed work but the problem is that they don't run in parallel. Kind of a bummer, eh?

It's especially frustrating when I hacked up a dsl and a RESTful service for executing commands on remote clients in a few hours and I have spent an entire day of my life trying to get it to work properly in windows. I guess this is where Ruby's unix prejudice really starts to show (personally, that's fine with me).

So, after finally figuring out why my DRb server was unresponsive after spawning a new thread I figured I would try using JRuby since it uses Java Threads. Let me first say that I'm quite impressed with the work that the JRuby team is doing. However, due to a bug that exists in the 0.9.x branch I was still unable to get DRb to spawn the thread properly either (for totally different reasons). On a sidenote my friend ruby-debug doesn't currently work under JRuby either. I will dig deeper into that problem later, but after spending and 2 hours and getting 'no where' I have moved on.

So I'm switching to edge YARV. That's the bytecode interpreter that's shipping with Ruby 2.0. I read that there are more threading options available in YARV and I'm interested to see if it helps me out at all.

2 comments:

Unknown said...

Here is the cure ... don't use windows :-).

brenton said...

Unfortunately I need this tool to run on linux && windows since it's main job is to fire off selenium jobs that test Firefox and IE. In the end I think I'm going to stick with jruby. It's definitely the most 'enterprise ready' (I know you love that phrase) of the options I tried.

Tags

my google reader feed