From: Michael Neumann Date: 2001-11-18T00:01:38+09:00 Subject: [ruby-talk:25707] Re: more than one object in a druby server? Tobias DiPasquale wrote: > Hi all, > > Does anyone know of a way to attach more than one object to a druby > server? What I want to do is have clients make requests to the server to > get references to other remote objects so that methods could be called > on them as well. Any ideas? What about this little name server? require "drb/drb" class Registry def initialize @hash = {} end def [](key) @hash[key] end def []=(key, val) @hash[key] = val end end reg = Registry.new reg["firstObject"] = String.new "Test" reg["otherObject"] = Array.new primary = DRb::DRbServer.new("druby://0.0.0.0:5555", reg) puts primary.uri primary.thread.join The client can now call [] on the remote object to get a reference to one of the two registered objects. > P.S. Would 'rinda' be any help? If so, what is 'rinda'? Sounds like it > might be the thing, but can't find any docs on it. (don't speak Japanese) > > -- > > 0100001101000010010000110100011101110101 > << Tobias DiPasquale >> > -=[ Solaris Systems Administrator ]=- > Villanova University ECE Dept. > mailto: anany@ece.vill.edu > -=[ Applications Engineering Consultant ]=- > BCS Solutions, Inc. > mailto: tdipasquale@bcssinc.com > 0100001101000010010000110100011101110101 > -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de