Just go through ruby cookbook & only tutorial for any DRb stuff. But I
need help explain below example that I don’t understand why DRbUndump
is not needed. On some of the samples, I see class definition is
defined in a separate file and was ‘require’ by both client & server.
But in this case, the class definition is embedded in server side
code.
The below code works. I would think variable ‘ro’ in client represent
a proxy. So on the server side, the class definiton probably need to
include DRbUndump. Can anyone explain to my confusion?
Just go through ruby cookbook & only tutorial for any DRb stuff. But I
need help explain below example that I don’t understand why DRbUndump
is not needed. On some of the samples, I see class definition is
defined in a separate file and was ‘require’ by both client & server.
But in this case, the class definition is embedded in server side
code.
The below code works. I would think variable ‘ro’ in client represent
a proxy. So on the server side, the class definiton probably need to
include DRbUndump. Can anyone explain to my confusion?
This is exactly right. DRbUndumped forces the creation of a proxy
object on the client.
Just go through ruby cookbook & only tutorial for any DRb stuff. But I
need help explain below example that I don’t understand why DRbUndump
is not needed. On some of the samples, I see class definition is
defined in a separate file and was ‘require’ by both client & server.
But in this case, the class definition is embedded in server side
code.
This is exactly right. DRbUndumped forces the creation of a proxy
object on the client.
Thanks Eric, it is much clear to me now! The recipe 16.10 of ruby
cookbook include class definition on both client and server that was
not actually required on client side. From other examples, it is clear
now when I need it. I think I need to watch out the parameters pass to
the method.
Your online tutorial also very helpful, BTW, thanks again!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.