public
Last active

  • Download Gist
drb_client.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#!/usr/bin/env ruby
 
require 'drb/drb'
require 'drb/ssl'
 
begin
DRb.start_service(RemObjc.new)
rmtobj = DRbOject.new_with_uri(SERVER_URI)
rescue => e
# log.info("ERROR: #{e}")
end
 
class Local
attr_accessor :op1, :op2
def initialize *args
@remote_object = op1
any = op2
# whatever
end
 
def run
result = method1(@remote_object.get_list)
#
# This code will run server side?
@remote_object.dump_result_to_remote_database(result)
end
 
def method1 *args
# TODO
end
 
def method2 *args
# TODO
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.