From: xa3a.mc@... Date: 2006-04-24T13:37:34+09:00 Subject: Re: a flaw in tuplespace implementation? have you tried combining the tuplespace and ring API? your example indeed works when ring API is not used, simply providing a tuplespace as a DRb service instead of a Ring service. but i'd rather have some code that would enable me to automatically find a tuplespace, not manually by passing the tuplespace's uri. i modified your code to show you the problem i faced in my first post, and added two ring files (name server and space provider, which is actually your code as listed in your segment7 site) Eric Hodel wrote: > $ cat ts.rb not needed, since i am using ring API to provide the tuplespace $ cat master.rb require "rinda/ring" require 'drb' require 'x' DRb.start_service #ts = DRbObject.new nil, ARGV.shift ringServer = Rinda::RingFinger.primary ts = ringServer.read([:name, :TupleSpace, nil, nil])[2] ts = Rinda::TupleSpaceProxy.new ts x = X.new x.value = 0 ts.write [:x, x] $ cat slave.rb require "rinda/ring" require 'drb' require 'x' DRb.start_service #ts = DRbObject.new nil, ARGV.shift ringServer = Rinda::RingFinger.primary ts = ringServer.read([:name, :TupleSpace, nil, nil])[2] ts = Rinda::TupleSpaceProxy.new ts obj = ts.read [:x, nil] p obj.last p obj.last.value obj.last.value = 100 p obj.last.value $ cat name_server.rb require "rinda/ring" require "rinda/tuplespace" DRb.start_service Rinda::RingServer.new Rinda::TupleSpace.new DRb.thread.join $ cat space_provider.rb require "rinda/ring" require "rinda/tuplespace" DRb.start_service ts = Rinda::TupleSpace.new provider = Rinda::RingProvider.new :TupleSpace, ts, "Tuple Space" provider.provide DRb.thread.join $ ruby name_server.rb & $ ruby space_provider.rb & $ ruby master.rb & ...[error strings] in `init_with_ary': undefined method `size' for (NoMethodError) ...[another error strings] $ ruby slave.rb -- Posted via http://www.ruby-forum.com/.