From: Tony Arcieri Date: 2011-12-14T09:20:52+09:00 Subject: Re: Servers, Threads, and the Ruby Way -- Architecture Question --00032555f6ea0167df04b4025739 Content-Type: text/plain; charset=ISO-8859-1 You might be interested in checking out my library Celluloid: https://github.com/tarcieri/celluloid Celluloid is a library for making concurrent objects that each run in their own thread. It lets you model things like the server processes/threads as concurrent objects, along with each of the games. Here's an example of building a TCP server with Celluloid: https://github.com/tarcieri/celluloid/blob/master/lib/celluloid/tcp_server.rb Celluloid would let you model the game threads like this: class Game include Celluloid ... end Communication is handled through normal Ruby method calls. Celluloid also supports asynchronous method calls which allows concurrent objects to send a message requesting a call without waiting for a response. On Tue, Dec 13, 2011 at 12:47 PM, EP PG wrote: > EP PG wrote in post #1036583: > > Hi there, I'm a TOTAL Ruby newbie, but not new to programming. > > [snipped, it is long!] > > > > > Architecture ideas? > > > > OK., I thought of something. Please let me know if it sounds ridiculous. > > I will have 2 processes. ONe is the "server" process which listens on > two ports via two threads like I already have. The other process is one > that basically creates a thread for each "game" that gets added to the > queue. Does this sound reasonable? > > Let me know. > > Now I only need to find out how to send data from the server process to > the schedule process. How is this typically done? > > Thanks, > > -E. > > -- > Posted via http://www.ruby-forum.com/. > > -- Tony Arcieri --00032555f6ea0167df04b4025739--