Skip to content

Instantly share code, notes, and snippets.

Created July 2, 2015 14:46
Show Gist options
  • Save anonymous/4beae2b1410282fe3c79 to your computer and use it in GitHub Desktop.
Save anonymous/4beae2b1410282fe3c79 to your computer and use it in GitHub Desktop.
class WelcomeController < ApplicationController
def index
end
def welcome
require 'drb'
shared_obj = { id: params.require(:id) }
render text: shared_obj.to_s
def shared_obj.send_to_digi(msg)
render text: msg
end
DRb.start_service('druby://localhost:9001', shared_obj)
DRb.thread.join
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment