Ziff-Davis Enterprise 
DevSource: Microsoft Developer Resource
Add OnsArchitectureLanguagesTechniquesUsing VSForums
 
Home arrow Languages arrow Page 4 - Five Things You Didn't Know You Could Do with Ruby
Five Things You Didn't Know You Could Do with Ruby
By Hal Fulton

Rate This Article:
Add This Article To:
Five Things You Didn't Know You Could Do with Ruby - ' Distributed Apps '
( 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.

ADVERTISEMENT

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."



 
 
>>> More Languages Articles          >>> More By Hal Fulton
 



DevSource video
Devsource Video Series
Manipulating Society through Technology
Jeremy Bailenson, Director of the Virtual Human Interaction Lab at Stanford University, talks about virtual reality, avatars, Moore's law, how real world behaviors influence online reality, and societal manipulation through technology!
>> Play video
>> Read article
>> See all videos
DevLife Blog

Julia explores the Robotics Studio! (It's for more than you think.)

MSDev Blog

Messages for Bill Gates!

Make it Work
.NET makes runtime type checking a breeze. See what Peter has to say about it in this week's tips!
News
Microsoft Counts on App Support for Vista
Microsoft has taken pains to demonstrate that Windows Vista will have ample application support.
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.