Stopping a specific DRb service

Discussion in 'Ruby' started by Christopher Dancy, May 24, 2010.

  1. I have a DRb service which in turn spawns off multiple threads. Each of
    these threads interacts with other DRb services on different machines.
    To interact with these other DRb services I of course do something to
    the effect of

    DRb.start_service
    status = DRbObject.new_with_uri(blah blah blah)

    So far I've just let the method finish which calls these external DRb
    services. However this does not close the connection with them. The
    method itself finishes but the connection is still live. If I attempt to
    do DRb.stop_service it kills the main program altogether. Is there a way
    I can close that specific connection with killing the main executing
    program?
    --
    Posted via http://www.ruby-forum.com/.
    Christopher Dancy, May 24, 2010
    #1
    1. Advertising

  2. Christopher Dancy wrote:
    > I have a DRb service which in turn spawns off multiple threads. Each of
    > these threads interacts with other DRb services on different machines.
    > To interact with these other DRb services I of course do something to
    > the effect of
    >
    > DRb.start_service
    > status = DRbObject.new_with_uri(blah blah blah)
    >
    > So far I've just let the method finish which calls these external DRb
    > services. However this does not close the connection with them. The
    > method itself finishes but the connection is still live. If I attempt to
    > do DRb.stop_service it kills the main program altogether. Is there a way
    > I can close that specific connection with killing the main executing
    > program?


    SOLVED. I was under the impression ( not sure which site at the moment
    gave me the idea ) that in order to communicate with a DRb service the
    calling thread had to do something like "DRb.start_service" for just
    issuing a command. If I had read the actual DRbServer Documentation
    earlier I might have avoided this problem. Requiring 'drb' and doing
    something like "status = DRbObject.new_with_uri(host:port).get_status"
    worked just fine. Just an FYI in case anyone comes across this same
    problem.
    --
    Posted via http://www.ruby-forum.com/.
    Christopher Dancy, May 25, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miles Keaton
    Replies:
    3
    Views:
    172
    Miles Keaton
    Mar 30, 2005
  2. Kirk Haines

    More DRb; SSL & DRB & errors

    Kirk Haines, Jul 1, 2005, in forum: Ruby
    Replies:
    0
    Views:
    115
    Kirk Haines
    Jul 1, 2005
  3. Mark Volkmann

    stopping a drb server

    Mark Volkmann, Jul 17, 2005, in forum: Ruby
    Replies:
    10
    Views:
    334
    Yohanes Santoso
    Jul 20, 2005
  4. J. Wook
    Replies:
    16
    Views:
    271
    Robert Klemme
    May 16, 2007
  5. Ittay Dror
    Replies:
    1
    Views:
    122
    Ittay Dror
    Oct 21, 2008
Loading...

Share This Page