passing to with drb

L

Larz

I've been finding it easiest to pass hashes and arrays to DRb
processes because of what it can marshal. It would be nice if I could
pass a Struct or something as hash notation is extra verbose and I'd
like to be able to use the 'dot' notation. I guess I'd have to use
some sort of hash to Struct conversion after recieving the hash,
anyone else thought about that type of thing ?
 
B

Brian Candler

Larz said:
I've been finding it easiest to pass hashes and arrays to DRb
processes because of what it can marshal. It would be nice if I could
pass a Struct or something as hash notation is extra verbose and I'd
like to be able to use the 'dot' notation. I guess I'd have to use
some sort of hash to Struct conversion after recieving the hash,
anyone else thought about that type of thing ?

No need, you can pass your native struct (or any other Ruby class).
However both client and server processes need the class definition. If
you stick this in a file which they both require, then the job is done.
 

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

Members online

Forum statistics

Threads
474,184
Messages
2,570,973
Members
47,530
Latest member
jameswilliam1

Latest Threads

Top