Skip to content

Instantly share code, notes, and snippets.

@squarism
Created September 14, 2023 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save squarism/136ecefa8c5c380deef165fd9de21ef1 to your computer and use it in GitHub Desktop.
Save squarism/136ecefa8c5c380deef165fd9de21ef1 to your computer and use it in GitHub Desktop.
Ruby DRB quicksummary
require 'drb/drb'
DRb.start_service
remote = DRbObject.new_with_uri("druby://localhost:8787")
remote.pid
# => <some pid>
# you can verify the PIDs with top and you can filter by process name like ruby or irb or something
require 'drb/drb'
class Server
def pid
Process.pid
end
end
DRb.start_service("druby://localhost:8787", Server.new)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment