Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View drb_client.rb
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 37 38
#!/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
 
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.