[Mongrel] mongrel thread safety and global variables
gethemant at gmail.com
Sat Sep 2 07:30:43 EDT 2006
Yes...its a multithreaded and supposed to server request flawlessly.
BTW, as a quick check...i wrote a ruby program to fetch data for some 10000
iterations and and append it to a CSV file...and didn't get a single data
Next step, I will try 100 simultaneous threads, fetching the data and see if
there is a mis-match.
On 9/2/06, Luis Lavena <luislavena at gmail.com> wrote:
> On 9/1/06, hemant <gethemant at gmail.com> wrote:
> > We initially chose UNIXSocket over TCPSockets, because of performance
> > reasons.
> > As it turns out, its not so scalabale..so we may scrap it.
> Ok, is your UNIXServer implemented in a multithread fashion? (so it
> could hadle multiple clients to connect).
> how its coded?
> Like this:
> require 'socket'
> SOCKET = "/tmp/sample"
> server_thread = Thread.start do # run server in a thread
> sock = UNIXServer.open(SOCKET)
> s1 = sock.accept
> p s1.recvfrom(124)
> client = UNIXSocket.open(SOCKET)
> client.send("hello", 0)
> I compared unix sockets to windows pipes... which is wrong, my mistake.
> Have you tried connect to ruby clients in the same machine to the
> running socket server?
> If that works, then your problem could be... anything ;-) (just kidding)
> Luis Lavena
> Multimedia systems
> Leaders are made, they are not born. They are made by hard effort,
> which is the price which all of us must pay to achieve any goal that
> is worthwhile.
> Vince Lombardi
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
nothing much to talk
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users