I know a number of people are/were interested in this.
I've just requested the rubyforge project for Roxy.
If you've watched the ruby-talk mailing list over the past few weeks,
I've been having a discussion with a number of people about
implementing clean proxy objects. Ones that don't hide the signatures
of the objects they are meant to impersonate.
Anyways, I've built what I believe is version 0.1 of the project. It
even works with blocks (see the snippets below). And, since the object
impersonates the remote, irb's auto-completion works for remote
objects.
So, as soon as the rubyforge folks validate the project, I will get
things posted for all to help make even better.
.. until then, I'll simply wet your appetite with the following:
-- SCRIPT: server.rb --
require 'roxy'
my_array = [ 1, 2, 3, 4, 5 ]
server = RoxyServer.new( "hostname", 4242, my_array )
trap( "INT" ) { server.stop_server }
server.start_server.join
-- END: SCRIPT --
-- SCRIPT: client.rb --
require 'roxy'
obj = Roxy.new( "hostname", 4242 )
obj.class #=> Array
obj.methods # returns list of Array instance methods
obj.map { |c| c*2 } #=> [ 2, 4, 6, 8, 10 ]
-- END: SCRIPT --
Let me know what you think. I'm getting things posted as quickly as possible.
Additional features I plan to implement include allowing for ANY
Socket object to act as medium for communication, that way people can
override it with whatever protocols they would like to use.
A known limitation is that ONLY the first call of a chain (
obj.call.call.call ) will be executed remotely, the rest will be
executed locally on the result values.
So, until I get the project posted... please let me know and I can
send you one by hand.
Again, your feedback is very much appreciated.
j.
--
"http://ruby-lang.org -- do you ruby?"
Jeff Wood
Done :-)
Yours,
Tom
j.
Yup, Tim Sutherland is currently serving as the RubyForge newscaster:
I think he checks pending news postings once every day or so...
Yours,
Tom
Now all we need is an ORB!
Ed
> Hey folks.
>
> I know a number of people are/were interested in this.
>
> I've just requested the rubyforge project for Roxy.
>
> If you've watched the ruby-talk mailing list over the past few weeks,
> I've been having a discussion with a number of people about
> implementing clean proxy objects. Ones that don't hide the signatures
> of the objects they are meant to impersonate.
>
> Anyways, I've built what I believe is version 0.1 of the project. It
> even works with blocks (see the snippets below). And, since the object
> impersonates the remote, irb's auto-completion works for remote
> objects.
>
> So, as soon as the rubyforge folks validate the project, I will get
> things posted for all to help make even better.
>
> ... until then, I'll simply wet your appetite with the following:
>
> -- SCRIPT: server.rb --
>
> require 'roxy'
>
> my_array = [ 1, 2, 3, 4, 5 ]
> server = RoxyServer.new( "hostname", 4242, my_array )
> trap( "INT" ) { server.stop_server }
> server.start_server.join
>
> -- END: SCRIPT --
>
> -- SCRIPT: client.rb --
>
> require 'roxy'
>
> obj = Roxy.new( "hostname", 4242 )
> obj.class #=> Array
> obj.methods # returns list of Array instance methods
> obj.map { |c| c*2 } #=> [ 2, 4, 6, 8, 10 ]
>
> -- END: SCRIPT --
>
> Let me know what you think. I'm getting things posted as quickly as
> possible.
Roxy looks like it reimplements a significant portion of DRb. Have
you thought about making Roxy simply a DRb server? You'll save lots
of code and can get auto-discovery for free.
> Additional features I plan to implement include allowing for ANY
> Socket object to act as medium for communication, that way people can
> override it with whatever protocols they would like to use.
DRb gives you this for free :)
> A known limitation is that ONLY the first call of a chain (
> obj.call.call.call ) will be executed remotely, the rest will be
> executed locally on the result values.
With DRb you can (supposing each #call returns obj) keep all calls
remote through DRb::DRbUndumped.
--
Eric Hodel - drb...@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04