Forum: Ruby DRbUndumped and Marshal

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kevin B. (Guest)
on 2005-12-21 00:46
(Received via mailing list)
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?
James G. (Guest)
on 2005-12-21 02:25
(Received via mailing list)
On Dec 20, 2005, at 4:45 PM, Kevin B. wrote:

> 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 G. II
This topic is locked and can not be replied to.