DRbUndumped and Marshal

K

Kevin Brown

I'm using DRb with quite a few objects marked as DRbUndumped. Some of these
objects also need to persist to disk, which I was using Marshal to do before
I introduced the DRb chunk and it worked just fine. Now, of course, I get an
error when I try to Marshal anything, so I was using YAML. Which works great
but is slow.

The files do not need to be human readable, so is there any way to either
uninclude DRbUndumped or allow Marshall to temporarily bypass DRbUndumped so
I can have the speed of Marshal?
 
J

James Edward Gray II

I'm using DRb with quite a few objects marked as DRbUndumped. Some
of these
objects also need to persist to disk, which I was using Marshal to
do before
I introduced the DRb chunk and it worked just fine. Now, of
course, I get an
error when I try to Marshal anything, so I was using YAML. Which
works great
but is slow.

The files do not need to be human readable, so is there any way to
either
uninclude DRbUndumped or allow Marshall to temporarily bypass
DRbUndumped so
I can have the speed of Marshal?

Instead of using DRbUndumped, you can wrap the object to send:

obj_to_share = DRbObject.new( my_object ) # will be shared by proxy

Since you didn't modify the class, I'm *assuming* it would Marshal
(untested).

Hope that helps.

James Edward Gray II
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top