2005-03-23
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 4 of 6 )
Run Sophisticated Distributed Applications
This is the twenty-first century, and while we don't yet have flying cars, we do have our computers talking to each other more and more. Distributed computing is a great way to scale applications gradually and make use of CPU power that may be scattered across the room, the country, or the world.
The classic way to do this in Ruby is an out-of-the-box solution, called "drb" or "distributed Ruby." The drb library is part of the standard installation.
The distributed Ruby library allows any Ruby object to invoke methods on any other Ruby object across processes or even across machines. Those who want to get started with drb can view the many excellent tutorials on the subject, such as Chad Fowler's.
The drb library isn't CORBA. In many ways, I consider that a good thing; the simplicity and ease of use of drb is unparalleled. But if you want service discovery, you can use the Rinda add-on which works seamlessly with drb. And for those of you who are tuplespace fans, there is also a drb-based tuplespace implementation.
If you're into XML-RPC, Ruby has an XMLRPC library (with a little tutorial at http://xmlrpc-c.sourceforge.net/xmlrpc-howto/xmlrpc-howto-ruby.html among others). If you prefer YAML to XML — as many do in certain situations — there is a similar YAML-based protocol called !okay/rpc).
If you want to interface to high-powered legacy software and applications on supercomputers, MPI/Ruby is worth looking into. This binding to MPI (the Message-Passing Interface) was first created by Emil Ong of Argonne National Lab in 2001. This is a mapping of classic MPI to the OOP paradigm; according to Ong, "[MPI/Ruby] aims to be a complete binding to MPI in that it offers access to nearly all functionality of MPI — all of the communication and topology features are available, but the programmer no longer needs to deal with buffers and datatypes."
![]() |
|


