Today… err, yesterday, I began looking at Distributed Ruby, or DRb. DRb is a system for allowing Ruby processes to communicate with each other. Really, it’s a client/server thing.
This is part of the Peer Pressure Learning 30 series. To learn more about what in the hell that means, see the intro to the series, A Good Time To Learn.
NOTHING! DRb is included in Ruby 1.8+.
The DRb Site
I started with what I believe to be the DRb site. In particular, the Introduction to DRb was a pretty straightforward way to get started. If your eyes are up to the task of actually reading the content on this site, the content can be quite informative.
What I Think I Now Know
DRb is a lot of fun to play with, for some reason. I don’t really think the DRb site quite does it justice, actually. There are many possibilities. For instance, distributed FizzBuzz!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
1 2 3 4 5 6 7 8 9 10
Of course we need to access FizzBuzz answers from a remote client, right? Place each of those in an executable file (e.g. the server script in
server.rb, the client script in
client.rb). Then, in one terminal window, run
./server.rb, and in the other run
I really recommend giving the Introduction to DRb a quick skim, at least. It’s really not too complicated, as long as you’re awake enough to read it clearly.
I’m so close. I will be doubling up tomorrow, as tomorrow marks the final day of the PPL30. I swear, I’m going to finish. Success is within my grasp, and I shall not allow accolades of such great import slip feebly from my fingers! … Yup, so, Schema and MacRuby.