From: Javier Valencia Date: 2006-05-21T06:31:03+09:00 Subject: Re: Drb and PStore behaviour Oh, so the answer to my problem will be to rewrite using sockets and marshaling for that. (the same happened with xmlrpc). thanks for the quick response. Jamey Cribbs wrote: > 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? >> >> > > >