Challenging Project ... Need a deep guru to provide enlightenment.

K

Kevin Brown

Or to be specifically accurate, DRbObjects aren't transparent enough ...
they don't provide you with the list of available functionality
appropriately.

Biggest place I've hit this is while using DRb and the Qt/Ruby bindings
together. The bindings make extensive use of method_missing calls, and those
just don't work transparently with DRb proxy objects. :)
 
A

Ara.T.Howard

Actually I wrote a new chunk of code based on Ara's snippet that for direct
calls does EXACTLY what I want it to ... I'll be posting it later today ...
I just have to deal with stuff like blah.call.call2.call3 ... which I don't
believe will currently work ... I'll have to dig through and see how DRb
makes it work ... DRbObjects don't work ... call methods or call
respond_to? ... they are NOT calls on the remote object ... I don't believe
ANY call on a proxied object should be local, they should ALL be passed over
the wire ( and yes, I know that at least id and send can't, but everything
other than those ). I really think you guys will like the stuff I have ...
So far, I'm calling it Roxy ...
Thanks.
j.

sounds neat - now that i understand what you're after. i guess that approach
would be find so long as one has __some__ method to determine what the heck
the object 'really' like:

proxy.__drb #=> the obj
proxy.__drb? #=> true

but i like the sound of making drb objects as close to local ones at possible.

look forward to seeing what you come up with.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 
J

Jeff Wood

------=_Part_17909_7654111.1129304770928
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On the way to work this morning, I even got it executing remote blocks ...

so client code looks like:

require 'roxy'
obj =3D Roxy.new( "otherhost", 4242 )
obj.func( [ 1, 2, 3 ] ) { |a| puts a }

... I just have to figure out how I'm going to deal with syntax that is
multi-layered...

blah.call.call2.call3

with how I have things now, blah.call would be run proxied, but .call2.call=
3
would be run locally on the result of the first call.

Anyways, that's about the only issue I have left to work out... I'll post
soon, better to post early than not at all ;)

j.

Actually I wrote a new chunk of code based on Ara's snippet that for direct
calls does EXACTLY what I want it to ... I'll be posting it later today ...
I just have to deal with stuff like blah.call.call2.call3 ... which I don't
believe will currently work ... I'll have to dig through and see how DR= b
makes it work ... DRbObjects don't work ... call methods or call
respond_to? ... they are NOT calls on the remote object ... I don't believe
ANY call on a proxied object should be local, they should ALL be passed over
the wire ( and yes, I know that at least id and send can't, but everything
other than those ). I really think you guys will like the stuff I have ...
So far, I'm calling it Roxy ...
Thanks.
j.

sounds neat - now that i understand what you're after. i guess that
approach
would be find so long as one has __some__ method to determine what the
heck
the object 'really' like:

proxy.__drb #=3D> the obj
proxy.__drb? #=3D> true

but i like the sound of making drb objects as close to local ones at
possible.

look forward to seeing what you come up with.

-a
--

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D


--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood

------=_Part_17909_7654111.1129304770928--
 
A

Ara.T.Howard

On the way to work this morning, I even got it executing remote blocks ...

so client code looks like:

require 'roxy'
obj = Roxy.new( "otherhost", 4242 )
obj.func( [ 1, 2, 3 ] ) { |a| puts a }

... I just have to figure out how I'm going to deal with syntax that is
multi-layered...

blah.call.call2.call3

with how I have things now, blah.call would be run proxied, but .call2.call3
would be run locally on the result of the first call.

Anyways, that's about the only issue I have left to work out... I'll post
soon, better to post early than not at all ;)


something recursive like

obj.class.instance_methods.each do |m|
module_eval <<-code
def #{ m } *a, &b
Roxy::new( send "#{ m }", *a, &b )
end
code
end

so, every return value of Roxy must, itself, be a Roxy.

this sounds very nice.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| anything that contradicts experience and logic should be abandoned.
| -- h.h. the 14th dalai lama
===============================================================================
 
J

Jeff Wood

------=_Part_18049_9077770.1129305704668
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Yeah, but I have to tell the server side WHICH object to call the methods o=
n
... that's what's gumming me up.

I'm glad I've peaked your tastebuds ... It's very close ...

I'll either start it as it's own project or stuff it into nano or mega.

j.

On the way to work this morning, I even got it executing remote blocks ...

so client code looks like:

require 'roxy'
obj =3D Roxy.new( "otherhost", 4242 )
obj.func( [ 1, 2, 3 ] ) { |a| puts a }

... I just have to figure out how I'm going to deal with syntax that is
multi-layered...

blah.call.call2.call3

with how I have things now, blah.call would be run proxied, but .call2.call3
would be run locally on the result of the first call.

Anyways, that's about the only issue I have left to work out... I'll post
soon, better to post early than not at all ;)


something recursive like

obj.class.instance_methods.each do |m|
module_eval <<-code
def #{ m } *a, &b
Roxy::new( send "#{ m }", *a, &b )
end
code
end

so, every return value of Roxy must, itself, be a Roxy.

this sounds very nice.

-a
--

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| anything that contradicts experience and logic should be abandoned.
| -- h.h. the 14th dalai lama

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D


--
"http://ruby-lang.org -- do you ruby?"

Jeff Wood

------=_Part_18049_9077770.1129305704668--
 
K

Kirk Haines

Yeah, but I have to tell the server side WHICH object to call the methods
on ... that's what's gumming me up.

I'm glad I've peaked your tastebuds ... It's very close ...

I'll either start it as it's own project or stuff it into nano or mega.

It's own project would be best, IMHO. There's nothing wrong with small
projects, especially when they stand alone as well as this does.


Thanks,

Kirk Haines
 
J

Jeff Wood

I just posted an announcement outside this thread for version 0.1 of
the project.

Just waiting for rubyforge to approve the project, then I can post source.

j.
 

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
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top