# Need help with a general concept

**URL:** <https://www.ruby-forum.com/t/need-help-with-a-general-concept/86249>\
**Category:** Ruby\
**Created:** [February 20, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/need-help-with-a-general-concept/86249 "2007-02-20T23:25:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [February 20, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/need-help-with-a-general-concept/86249/1 "2007-02-20T23:25:39Z")

</div>

I’m trying to make an application with the following properties:  
It uses FXRuby  
It’s a multiplayer turn based card game  
Played over a network, or the internet  
Players may play cards during other players turns  
Players may manipulate their own components at any time  
Players can make requests for info on any other players components at  
any time

I originally planned to use threading, but I didn’t know that Ruby  
blocked IO in threads. Is there a better way to implement this type of  
game than using threads and sockets? I am somewhat new to ruby, I  
wouldn’t consider myself an average ability ruby coder yet. How should  
I go about this?

---

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [February 21, 2007, 12:19am UTC](https://www.ruby-forum.com/t/need-help-with-a-general-concept/86249/2 "2007-02-21T00:19:24Z")

</div>

On 2/20/07, Raj S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> blocked IO in threads. Is there a better way to implement this type of  
> game than using threads and sockets? I am somewhat new to ruby, I  
> wouldn’t consider myself an average ability ruby coder yet. How should  
> I go about this?

Two things to look into would be DRb and Rinda. Eric H. has a nice  
writeup about both on his segment7 blog.

[http://segment7.net/projects/ruby/drb/index.html](http://segment7.net/projects/ruby/drb/index.html)

DRb stands for Distributed Ruby and Rinda is the Ruby implementation  
of a TupleSpace. The TupleSpace would be used to hold all the  
information about the current game state, and DRb would be used by the  
clients to communicate with one another.

Have fun with the project.

Blessings,  
TwP

---

<div class="post-metadata">

**Author:** ![dorelal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Post date:** [February 21, 2007, 9:59pm UTC](https://www.ruby-forum.com/t/need-help-with-a-general-concept/86249/3 "2007-02-21T21:59:25Z")

</div>

Thanks for the info. I probably should have read a little more through  
the library, I could have found those things myself. Just in case  
anyone else is interested, I did find a little more detailed intro to  
DRb at [http://chadfowler.com/ruby/drb.html](http://chadfowler.com/ruby/drb.html)

Raj
