From: Eleanor McHugh Date: 2009-03-05T08:54:04+09:00 Subject: Re: Is GServer the best to use? On 4 Mar 2009, at 23:46, Justin Collins wrote: > Iñaki Baz Castillo wrote: >> El Jueves, 5 de Marzo de 2009, Michael Furmaniuk escribió: >> >>> I am in need of a TCP Server, basically something multithreaded >>> that I >>> can use to pass through data to a database from clients that will >>> connect to the Server. I started playing with an example from the >>> O'Reilly Learning Ruby book, but when I looked around for some more >>> information I saw the references to GServer. Is this the best one >>> to >>> use? Is there something else that I can use for TCP that anyone can >>> recommend? My real need at this point is to have Clients connect >>> to the >>> Server with information of system status, or scripts that were run >>> and >>> their outputs, and put that in a database. So it doesn't need to be >>> complex, but I'd like it to be able to handle multiple clients and >>> be >>> able to keep a connection to the database, so there are not too many >>> open sockets; kind of why I want a pass through. >>> >>> Any recommendations would be appreciated. >>> >> >> GServer is in fact appropiate for that. >> >> > > I agree. Start off with GServer. It's really easy to use and works > well. > If, for some reason, that ends up not being able to handle all the > connections, then use Eventmachine[1]. You can find code examples covering GServer, EventMachine and various other bits of Ruby networking in the presentations link to in my signature. At some point I'll put them online properly as it seems a lot of people have an interest in this stuff :) Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason