11.3 Moving Ahead
In this chapter, we learned the following:
-
GC clears up nonaccessed objects in a process, so we need to take special care when accessing objects among processes using dRuby.
-
The easiest workaround is to control at the application level by holding a list of referenced objects or not publishing objects that we can’t control.
-
We can also use
DRbIdConv
to keep all the object references. -
Keeping all remote objects causes another problem of memory bloat.
TimerIdConv
is a class to set a timer on all the referenced objects so that we can let GC clear some temporary objects while protecting other referenced objects against GC.
The next chapter is the last chapter of this book. We’ll discuss dRuby’s security options and how you can use dRuby safely. You’ll also find out how to use dRuby across the network by using SSH.
English edition
The dRuby Book: Distributed and Parallel Computing with Ruby
by Masatoshi Seki (Translated by Makoto Inoue)
Copyright (C) 2012 by Masatoshi Seki
Originally published by Pragmatic Programmers, LLC.
Original Japanese edition
dRuby ni yoru Bunsan Web Programming
by Masatoshi Seki
Copyright (C) 2005 by Masatoshi Seki
Published by Ohmsha, Ltd.
3-1 Kanda Nishikicho, Chiyodaku, Tokyo 101-8460
Japan
The adobe copyright notice shall be included in all copies.