2 ms·
But for the CPU-bound cases, people are usually calling into a library implemented in C either way (this is why Resque uses a forking model instead of green thr
by derefr 13y ago
But for the CPU-bound cases, people are usually calling into a library implemented in C either way (this is why Resque uses a forking model instead of green threads, after all.) The only speed-up you'll get is in the glue, because the task itself will probably use the same C library.
- bradleyland 13y agoIf you're already doing the majority of your work (total run time) in C code, then of course you're not going to benefit from a Golang back-end, but I'd challenge the "usually" portion of your claim. C wrapped in Ruby is not the same as pure C or Golang. The tool-selection argument quickly devolves in to the usual arguments between the benefits of languages like Ruby versus lower level languages, but I'm not sure that's the most productive conversation. That's well traveled ground. What I'm saying is that I'm happy to see this (Golang workers available through a Resque API) as an option. I'm not advocating blindly replacing C implementations (or any other implementation), but I wouldn't be surprised to see a Golang back-end outperform Ruby code, even when that Ruby code is calling in to C libraries. The usual rules apply when making that evaluation. You have to see for yourself.
- benmanns 13y agoYes! I think you capture my intent with goworker. I like to think of it as a halfway point between pure C or C extensions and pure Ruby.