Drb in depth ?

  • Thread starter Mickael Faivre-Macon
  • Start date
M

Mickael Faivre-Macon

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.
 
M

M. Edward (Ed) Borasky

Mickael said:
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.
 
J

Jamey Cribbs

M. Edward (Ed) Borasky said:
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.
 
J

Jamey Cribbs

Jamey said:
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.
 
D

Dido Sevilla

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.
 
J

James Edward Gray II

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
 
M

Mickael Faivre-Macon

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.
 
M

Mickael Faivre-Macon

Hi Dido,

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

Mickael.
 
E

Eric Hodel

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)
 
E

Eric Hodel

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top