I have a fairly intensive algorithm that must be run pretty often (many times per second) in my RoR application. Considering how slow Ruby is with this kind of stuff, I don't think it would be good to do the work in Ruby.
You may be thinking I should add it to a work queue of some sort and have a C++ app work it down, but I need the result returned instantly. Is there a way to extend RoR with a C++ plugin or something? What if I something like connecting to the C++ app via a socket? Or would that just be crazy?