--s8wpp40TDz0KNMmP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Andre Nathan (andre / digirati.com.br) wrote:

> Eric Hodel said:
> > Would including DRbUndumped help?  This forces a DRbObject to be created
> > on the remote side, and makes sure all of the work happens on the side
> > of the connection that created the object.
>=20
> I believe this wouldn't solve the problem for local access to the methods.
> If they are declared private, a local instance of the class wouldn't be
> able to use them. Unless I misunderstood what you meant...

Use include DRbUndumped instead of declaring methods private.

Let me re-quote you:

> But that would make them unavaible for local use (my original idea was
> something like "you can use it locally, but not through the network".

Why do you want to do this?

Is it because certain operations must be performed only on one side of
the connection, or is it because certain operations are forbidden?

If its the former, DRbUndumped is the correct solution.

If its the latter, I would look at what including DRbUndumped does, you
can probably extend it to create your custom proxy object in a
straightforward matter, something like:

class Dangerous
  include MakeSafe
  safe_methods :foo, :bar

  ...
end

--=20
Eric Hodel - drbrain / segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04


--s8wpp40TDz0KNMmP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/966wMypVHHlsnwQRAoe/AKC92hAkq7/H4vHQE5gLOYt70/0POwCgsJgB
k9m2GFAoEYDhS0qA8UStUmA=
=ugft
-----END PGP SIGNATURE-----

--s8wpp40TDz0KNMmP--

Andre Nathan (andre / digirati.com.br) wrote:

> Eric Hodel said:
> > Would including DRbUndumped help?  This forces a DRbObject to be created
> > on the remote side, and makes sure all of the work happens on the side
> > of the connection that created the object.
>=20
> I believe this wouldn't solve the problem for local access to the methods.
> If they are declared private, a local instance of the class wouldn't be
> able to use them. Unless I misunderstood what you meant...

Use include DRbUndumped instead of declaring methods private.

Let me re-quote you:

> But that would make them unavaible for local use (my original idea was
> something like "you can use it locally, but not through the network".

Why do you want to do this?

Is it because certain operations must be performed only on one side of
the connection, or is it because certain operations are forbidden?

If its the former, DRbUndumped is the correct solution.

If its the latter, I would look at what including DRbUndumped does, you
can probably extend it to create your custom proxy object in a
straightforward matter, something like:

class Dangerous
  include MakeSafe
  safe_methods :foo, :bar

  ...
end

--=20
Eric Hodel - drbrain / segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/966wMypVHHlsnwQRAoe/AKC92hAkq7/H4vHQE5gLOYt70/0POwCgsJgB
k9m2GFAoEYDhS0qA8UStUmA=
=ugft
-----END PGP SIGNATURE-----