because... - Routine work translating between Ruby and the Web world - HTTP's restriction on how to exchange objects - Fixed relation between Server and Client - More like a functional call rather than a method
= 'hello' end def hello @hello end def sample(a, b, c) a.to_i + b.to_i + c.to_i end end if __FILE__ == $0 DRb.start_service('druby://localhost:7640', DRbEx.new) DRb.thread.join end require 'drb.rb' class DRbEx2 def initialize(n) @n = n end def _dump raise TypeError, 'can\'t dump' end def to_i @n.to_i end end if __FILE__ == $0 DRb.start_service('druby://localhost:7950') ro = DRbObject.new(nil, 'druby://localhost: 7640') p ro.hello p ro.sample(DRbEx2.new(1), 2, 3) p ro.sample(1, ro.sample(DRbEx2.new(1), 2, 3), DRbEx2.new(3)) end
like they had used dRuby/Rinda in the beginning. - But not now. - Even I sometimes start some services using dRuby, ending up not using it. - It happened since my services gained popularity, and I needed to make them more efficient.