Search code examples
rubyjrubydrb

How to implement remoting in Ruby over a proxy server?


We're looking at using Ruby for a client-server (non-web based) project where both the client and server would be written in JRuby. The client (Windows) would sit behind a corporate firewall with a proxy server and the server would sit out in the cloud. We know that DRb makes ruby-to-ruby remoting very easy but it's unclear whether DRb works over a proxy server. Is there a way to do this?

Alternatively, since we're using JRuby, we've thought about using Java RMI over HTTP


Solution

  • I think your best bet is to write some simple test scripts and try it before committing one way or another. There are various different proxy servers around, and its hard to answer your question definitively. If (as I suspect) your in a corporate environment there's probably a firewall or three to go through too (which may block "non-standard" ports - bad for DRb) or block server processes (a problem if you want two-way comms).

    Furthermore, I'd suggest abstracting your process communications. Depending on the nature of your company, and the profile of your app with that company, you may find the proxy and firewall changed without consideration for your requirements. By abstacting the comms, you're in a better position to slot another technique in if needs be.