From: Jamey Cribbs Date: 2006-05-21T06:15:09+09:00 Subject: Re: Drb and PStore behaviour The problem is that you can't pass a block from the client to the server because block's aren't serializable. Jamey Javier Valencia wrote: > I'm doing a remote database object so i can do: > > result = database.find do |record| > record[:name] == "john" > end > > in the server object i have something like: > > class Foo > include DRb::DRbUndumped > > def find(&block) > result = nil > @store.transaction do > result = @store[:records].find_all do |record| > yield(record) > end > end > return result > end > end > > well, the problem is yielding that block. All the database is > "cloned/copied" (?) over the network when doing the find. I don't want > to copy all that data, just return the found records. > > I tried adding DRb::DRbUndumped to class PStore, but the same result. > The database size is about 3 MB. > > Do you know how to solve this problem? > >