Drb in depth ?

Discussion in 'Ruby' started by Mickael Faivre-Macon, Oct 30, 2006.

  1. Hi,

    I can't find any in depth online article on Drb, presenting anything
    else than a simple server and client. I'd like to learn more on the
    idea behind it, when it can be used and for what type of application
    (for a client/server game?), how to manage clients (identifying them,
    disconnecting them), comparison with TCP (if relevent), etc...

    Could anyone point me a good article, or maybe just reply to my simple
    subjects given above?

    Many thanks,
    Mickael.
    Mickael Faivre-Macon, Oct 30, 2006
    #1
    1. Advertising

  2. Mickael Faivre-Macon wrote:
    > Hi,
    >
    > I can't find any in depth online article on Drb, presenting anything
    > else than a simple server and client. I'd like to learn more on the
    > idea behind it, when it can be used and for what type of application
    > (for a client/server game?), how to manage clients (identifying them,
    > disconnecting them), comparison with TCP (if relevent), etc...
    >
    > Could anyone point me a good article, or maybe just reply to my simple
    > subjects given above?
    >
    > Many thanks,
    > Mickael.
    >
    >

    I'm not sure anyone uses just drb ... it's more common to use drb via
    the Rinda layer on top of drb. Try a search for Rinda ... there was a
    talk about Rinda at RubyConf 2006.
    M. Edward (Ed) Borasky, Oct 30, 2006
    #2
    1. Advertising

  3. Mickael Faivre-Macon

    Jamey Cribbs Guest

    M. Edward (Ed) Borasky wrote:
    > Mickael Faivre-Macon wrote:
    >
    >> Hi,
    >>
    >> I can't find any in depth online article on Drb, presenting anything
    >> else than a simple server and client. I'd like to learn more on the
    >> idea behind it, when it can be used and for what type of application
    >> (for a client/server game?), how to manage clients (identifying them,
    >> disconnecting them), comparison with TCP (if relevent), etc...
    >>
    >> Could anyone point me a good article, or maybe just reply to my simple
    >> subjects given above?
    >>
    >> Many thanks,
    >> Mickael.
    >>
    >>
    >>

    > I'm not sure anyone uses just drb ... it's more common to use drb via
    > the Rinda layer on top of drb. Try a search for Rinda ... there was a
    > talk about Rinda at RubyConf 2006.
    >

    For a fairly simple example of how drb can be used to enable
    client-server/multiuser functionality, take a look at KirbyBase
    (http://netpromi.com/ruby_kirbybase.html). Drb works great and made
    implementing a client/server version of the dbms very easy. I had to
    throw in some mutex code to make sure separate user threads didn't step
    on each other, but it was fairly straightforward.

    Jamey

    Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.
    Jamey Cribbs, Oct 30, 2006
    #3
  4. Mickael Faivre-Macon

    Jamey Cribbs Guest

    Jamey Cribbs wrote:
    > M. Edward (Ed) Borasky wrote:
    >> Mickael Faivre-Macon wrote:
    >>
    >>> Hi,
    >>>
    >>> I can't find any in depth online article on Drb, presenting anything
    >>> else than a simple server and client. I'd like to learn more on the
    >>> idea behind it, when it can be used and for what type of application
    >>> (for a client/server game?), how to manage clients (identifying them,
    >>> disconnecting them), comparison with TCP (if relevent), etc...
    >>>
    >>> Could anyone point me a good article, or maybe just reply to my simple
    >>> subjects given above?
    >>>
    >>> Many thanks,
    >>> Mickael.
    >>>
    >>>
    >>>

    >> I'm not sure anyone uses just drb ... it's more common to use drb via
    >> the Rinda layer on top of drb. Try a search for Rinda ... there was a
    >> talk about Rinda at RubyConf 2006.
    >>

    > For a fairly simple example of how drb can be used to enable
    > client-server/multiuser functionality, take a look at KirbyBase
    > (http://netpromi.com/ruby_kirbybase.html). Drb works great and made
    > implementing a client/server version of the dbms very easy. I had to
    > throw in some mutex code to make sure separate user threads didn't
    > step on each other, but it was fairly straightforward.


    Oops, that should have been http://netpromi.com/kirbybase_ruby.html!

    Jamey

    Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.
    Jamey Cribbs, Oct 30, 2006
    #4
  5. Mickael Faivre-Macon

    Dido Sevilla Guest

    On 10/30/06, M. Edward (Ed) Borasky <> wrote:
    > I'm not sure anyone uses just drb ... it's more common to use drb via
    > the Rinda layer on top of drb. Try a search for Rinda ... there was a
    > talk about Rinda at RubyConf 2006.


    Funny, I use DRb by itself a lot, but have never yet used Rinda for a
    production application. DRb by itself works just fine for all of my
    needs, but then I'm not trying (yet) to build an application that will
    do automated service discovery. I don't see why you say it's more
    common to use Rinda on top of DRb. While I admit that Rinda is
    interesting, it still leaves you with the problem of the actual DRb
    services that you'll publish on top of it.

    Anyway, to answer the GP poster's question, I learned all I needed to
    know about programming DRb from the following sites:

    http://segment7.net/projects/ruby/drb/index.html
    http://wiki.rubygarden.org/Ruby/page/show/DrbTutorial

    Eric Hodel's segment7 site has a lot of stuff; even includes a
    tutorial on how to properly run DRb over SSL, and it appears to be one
    of the few English language sites describing how to use Rinda.

    By the way, DRb is really not that hard. From experience, DRb actually
    makes writing distributed objects TOO easy, so easy that you wind up
    making mistakes like forgetting that some object is actually a remote
    one, and consequently also forgetting the necessary error checking
    that that would entail, resulting in problems when you try using such
    remote services over something less reliable than a private LAN.
    Dido Sevilla, Oct 31, 2006
    #5
  6. On Oct 30, 2006, at 7:42 PM, Dido Sevilla wrote:

    > While I admit that Rinda is
    > interesting, it still leaves you with the problem of the actual DRb
    > services that you'll publish on top of it.


    I believe the other poster was referring more to Rinda::Tuplespace
    than Rinda::RingServer.

    James Edward Gray II
    James Edward Gray II, Oct 31, 2006
    #6
  7. Hi Jamey,

    Thanks for the code.
    Actually, I don't see in this code where you identify ("discriminate",
    not "authenticate") the clients. I'd like to see if it is possible for
    DRB to know who is the client. How can you manage connections, etc...

    Mickael.


    On 10/30/06, Jamey Cribbs <> wrote:
    > Jamey Cribbs wrote:
    > > M. Edward (Ed) Borasky wrote:
    > >> Mickael Faivre-Macon wrote:
    > >>
    > >>> Hi,
    > >>>
    > >>> I can't find any in depth online article on Drb, presenting anything
    > >>> else than a simple server and client. I'd like to learn more on the
    > >>> idea behind it, when it can be used and for what type of application
    > >>> (for a client/server game?), how to manage clients (identifying them,
    > >>> disconnecting them), comparison with TCP (if relevent), etc...
    > >>>
    > >>> Could anyone point me a good article, or maybe just reply to my simple
    > >>> subjects given above?
    > >>>
    > >>> Many thanks,
    > >>> Mickael.
    > >>>
    > >>>
    > >>>
    > >> I'm not sure anyone uses just drb ... it's more common to use drb via
    > >> the Rinda layer on top of drb. Try a search for Rinda ... there was a
    > >> talk about Rinda at RubyConf 2006.
    > >>

    > > For a fairly simple example of how drb can be used to enable
    > > client-server/multiuser functionality, take a look at KirbyBase
    > > (http://netpromi.com/ruby_kirbybase.html). Drb works great and made
    > > implementing a client/server version of the dbms very easy. I had to
    > > throw in some mutex code to make sure separate user threads didn't
    > > step on each other, but it was fairly straightforward.

    >
    > Oops, that should have been http://netpromi.com/kirbybase_ruby.html!
    >
    > Jamey
    >
    > Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.
    Mickael Faivre-Macon, Nov 2, 2006
    #7
  8. Hi Dido,

    This site is indeed the best site on Drb but do not answer all my questions :)
    But thanks for the link !

    Mickael.


    On 10/31/06, Dido Sevilla <> wrote:
    > On 10/30/06, M. Edward (Ed) Borasky <> wrote:
    > > I'm not sure anyone uses just drb ... it's more common to use drb via
    > > the Rinda layer on top of drb. Try a search for Rinda ... there was a
    > > talk about Rinda at RubyConf 2006.

    >
    > Funny, I use DRb by itself a lot, but have never yet used Rinda for a
    > production application. DRb by itself works just fine for all of my
    > needs, but then I'm not trying (yet) to build an application that will
    > do automated service discovery. I don't see why you say it's more
    > common to use Rinda on top of DRb. While I admit that Rinda is
    > interesting, it still leaves you with the problem of the actual DRb
    > services that you'll publish on top of it.
    >
    > Anyway, to answer the GP poster's question, I learned all I needed to
    > know about programming DRb from the following sites:
    >
    > http://segment7.net/projects/ruby/drb/index.html
    > http://wiki.rubygarden.org/Ruby/page/show/DrbTutorial
    >
    > Eric Hodel's segment7 site has a lot of stuff; even includes a
    > tutorial on how to properly run DRb over SSL, and it appears to be one
    > of the few English language sites describing how to use Rinda.
    >
    > By the way, DRb is really not that hard. From experience, DRb actually
    > makes writing distributed objects TOO easy, so easy that you wind up
    > making mistakes like forgetting that some object is actually a remote
    > one, and consequently also forgetting the necessary error checking
    > that that would entail, resulting in problems when you try using such
    > remote services over something less reliable than a private LAN.
    >
    >



    --
    Mickael.
    Coding an AI ! http://faivrem.googlepages.com/antbattle
    Mickael Faivre-Macon, Nov 2, 2006
    #8
  9. Mickael Faivre-Macon

    Eric Hodel Guest

    On Oct 30, 2006, at 2:35 AM, Mickael Faivre-Macon wrote:

    > I can't find any in depth online article on Drb, presenting anything
    > else than a simple server and client. I'd like to learn more on the
    > idea behind it,


    The basic idea is to remove the hassle of communication between
    processes and make your code look and feel like it is running as a
    single process.

    > when it can be used and for what type of application
    > (for a client/server game?),


    Any place you need transparent communication between processes.

    > how to manage clients (identifying them, disconnecting them),


    You don't. DRb nodes are both clients and servers. You can restrict
    connections by both ACLs and SSL keys. You can restrict method calls
    in other ways.

    > comparison with TCP (if relevent), etc...


    Huh? TCP is a much lower level protocol than DRb. (Also, DRb is
    multi-protocol)

    --
    Eric Hodel - - http://blog.segment7.net
    This implementation is HODEL-HASH-9600 compliant

    http://trackmap.robotcoop.com
    Eric Hodel, Nov 5, 2006
    #9
  10. Mickael Faivre-Macon

    Eric Hodel Guest

    On Oct 30, 2006, at 5:42 PM, Dido Sevilla wrote:
    > On 10/30/06, M. Edward (Ed) Borasky <> wrote:
    >> I'm not sure anyone uses just drb ... it's more common to use drb via
    >> the Rinda layer on top of drb. Try a search for Rinda ... there was a
    >> talk about Rinda at RubyConf 2006.

    >
    > Funny, I use DRb by itself a lot, but have never yet used Rinda for a
    > production application. DRb by itself works just fine for all of my
    > needs, but then I'm not trying (yet) to build an application that will
    > do automated service discovery. I don't see why you say it's more
    > common to use Rinda on top of DRb. While I admit that Rinda is
    > interesting, it still leaves you with the problem of the actual DRb
    > services that you'll publish on top of it.


    Rinda::RingServer and friends are for automated service discovery and
    sit on top of Rinda::TupleSpace. Whenever you need communication
    beyond what a set of Queues can provide a TupleSpace becomes your
    friend. The best book on how to use Linda/Rinda is:

    How To Write Parallel Programs: A First Course by Nicholas Carriero,
    David Gelernter 1990

    If you just want autodiscovery, RindyDingy wraps up all that hassle
    in an easy package.

    --
    Eric Hodel - - http://blog.segment7.net
    This implementation is HODEL-HASH-9600 compliant

    http://trackmap.robotcoop.com
    Eric Hodel, Nov 5, 2006
    #10
    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. Shawn

    Set bit depth of an image

    Shawn, Jul 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    634
    Daniel Bass
    Jul 4, 2003
  2. Miles Keaton
    Replies:
    3
    Views:
    179
    Miles Keaton
    Mar 30, 2005
  3. Kirk Haines

    More DRb; SSL & DRB & errors

    Kirk Haines, Jul 1, 2005, in forum: Ruby
    Replies:
    0
    Views:
    123
    Kirk Haines
    Jul 1, 2005
  4. J. Wook
    Replies:
    16
    Views:
    279
    Robert Klemme
    May 16, 2007
  5. Ittay Dror
    Replies:
    1
    Views:
    133
    Ittay Dror
    Oct 21, 2008
Loading...

Share This Page