From: Hugh Sasse Staff Elec Eng Date: 2003-03-11T04:00:08+09:00 Subject: Re: DRb: remote methods not running remotely??? On Tue, 11 Mar 2003, Hugh Sasse Staff Elec Eng wrote: > On Tue, 11 Mar 2003, Eric Hodel wrote: > > > Hugh Sasse Staff Elec Eng (hgs@dmu.ac.uk) wrote: > > > > > How can I test an object in a server to see if it is remote or local? > > > > > > Will certain kinds of objects always end up as local after being > > > sent to a server -- if for example they contain references to IO > > > objects which cannot be marshalled, or maybe references to the > > > sever? > > > > > > The thing is, I'm fairly sure the simplified version of this code > > > worked when it doe no I/O or serious work. > > > > IIRC any object you return that does not include DRbUndumped will > > be marshalled and returned to the client side. > > OK, I have not mixed that into the client class myself.... > If I do client.kind_of?(DRbUndumped) I get "false", which is what > I'd expect. So the client methods should run on the client then? > > Well, I've done further tests on this, and while I still can't get it to run the code on the right machine, I now know that: All the instance vars of the client give false in response to .kind_of(DRbUndumped); That when the client is marshalled (a) it happens successfully and (b) I get something like: marshalling... "\004\006o:\016TlmClient\t:\f@configo:\024TlmClientConfig\v:\v@table{\t\"\vidfile\"\020@ident_file\"\010tmp\"\n@temp\"\010uri\"\016@uri_page\"\niddir\"\017@ident_dir:\016@uri_page\"?http:///URIs.txt:\017@ident_dir\"\rPTlmUIds:\020@ident_file\"\020PTlmIds.txt:\n@temp\"\t/tmp:\017@conf_file\"\rTlm.conf:\023@remote_serveru:\023DRb::DRbObject \004\006[\a\"\031druby://neelix:464390:\v@ident\"\fsasse01:\016@skillseto:\rSkillset\006;\021c\016TlmClient" ...marshalled from $stderr.puts "marshalling..." $stderr.puts data.inspect $stderr.puts "...marshalled" So that looks fairly sensible (except that the has the correct value, which I'm not publishing yet. Hugh