DRb Question

J

Joe Van Dyk

I have an object that's available via DRb. The class makes available
several strings and arrays for client viewing.

I can access methods on the server that return strings fine. However,
I'm having difficulties accessing Array objects that are returned by
the server. The client code doesn't know anything about the main
server object, btw.

Any ideas?

Thanks,
Joe
 
E

Eric Hodel

--Apple-Mail-7-607542251
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

I have an object that's available via DRb. The class makes available
several strings and arrays for client viewing.

I can access methods on the server that return strings fine. However,
I'm having difficulties accessing Array objects that are returned by
the server. The client code doesn't know anything about the main
server object, btw.

Any ideas?

Do you include DRbUndumped in all the classes that don't exist on both
sides?

What is in the Arrays you return?

Just Ruby core objects, or other objects?

--
Eric Hodel - (e-mail address removed) - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

--Apple-Mail-7-607542251
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iEYEARECAAYFAkJpcAQACgkQMypVHHlsnwRitgCdFX/pFOvYin+cbNfe+7jrnOCX
+m8An2ibmexXGRj/3hJNSqyoY7eZg77O
=Ja19
-----END PGP SIGNATURE-----

--Apple-Mail-7-607542251--
 
J

Joe Van Dyk

Do you include DRbUndumped in all the classes that don't exist on both
sides?
No.


What is in the Arrays you return?

Just Ruby core objects, or other objects?

Other objects.
 
J

Joe Van Dyk

I have an object that's available via DRb. The class makes available
several strings and arrays for client viewing.

I can access methods on the server that return strings fine. However,
I'm having difficulties accessing Array objects that are returned by
the server. The client code doesn't know anything about the main
server object, btw.

Any ideas?

Here's another question regarding threads and DRb:

Every second, a function in the class that's being made available via
DRb should be called automatically. How would I do that?

So I'd have

class Server
def update
# stuff gets updated
end
end

server = DRb.start_service....
# start threads that call server.update every second
DRb.thread.join
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,170
Messages
2,570,925
Members
47,468
Latest member
Fannie44U3

Latest Threads

Top