DRb Question

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

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?

PGP.sig (194 Bytes)

···

On 22 Apr 2005, at 14:32, Joe Van Dyk wrote:

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?

--
Eric Hodel - drbrain@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04

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

···

On 4/22/05, Joe Van Dyk <joevandyk@gmail.com> wrote:

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?

> 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?

No.

What is in the Arrays you return?

Just Ruby core objects, or other objects?

Other objects.

···

On 4/22/05, Eric Hodel <drbrain@segment7.net> wrote:

On 22 Apr 2005, at 14:32, Joe Van Dyk wrote:

Fixed.. had to include DRbUndumped in the other classes that were in the arrays.

Thanks!

···

On 4/22/05, Joe Van Dyk <joevandyk@gmail.com> wrote:

On 4/22/05, Eric Hodel <drbrain@segment7.net> wrote:
> On 22 Apr 2005, at 14:32, Joe Van Dyk wrote:
>
> > 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?

No.

>
> What is in the Arrays you return?
>
> Just Ruby core objects, or other objects?

Other objects.