[Mongrel] mongrel thread safety and global variables
gethemant at gmail.com
Fri Sep 1 22:32:14 EDT 2006
We initially chose UNIXSocket over TCPSockets, because of performance
As it turns out, its not so scalabale..so we may scrap it.
On 9/2/06, Luis Lavena <luislavena at gmail.com> wrote:
> On 9/1/06, hemant <gethemant at gmail.com> wrote:
> > So, can't be a issue with my ConnectionClass, right?
> > Basically this UNIXSocket that i connect(sorry for confusion, its
> actually a
> > UNIXSocket ) , is a proxy between actual data vending servers and
> > serves multiple clients(not only rails client, other clients connect to
> > using TCPSockets) and is written to support multiple concurrent
> > But if I can confirm that there is no issue, with rails connections,
> then we
> > can inform the other team(i am not author of this proxy server), that
> > have a look at your code, and see if its thread safe.
> UNIXSocket is like file sockets, right? that means One process
> accessing it could put garbage IF other process jump into the socket.
> Someone correct me if I'm wrong, but multiple mongrel running from the
> same file socket will produce the behavior you're getting (misplaced
> stuff in the replies).
> > We have been initially using DRb, but there was a issue with connection
> > pooling.Besides, fetching data in real time from data vending servers
> > costly, hence this proxy does caching and all that stuff. As per my
> > understanding, the proxy is written like, for each connection it will
> > a new thread, and a new thread for putting the data to other data
> > servers and another thread for receiving the response and sending back
> > all the connected clients.It attaches unique ids to each request, to
> > sure that, no data mis-match occurs.
> A pool of connections (one implemented around multiuser protocols...
> TCPSocket) is my suggestion.
> If your ConnectionClass could connect to your vending server using a
> TCP Socket, it will work fine under multiple mongrels.
> > But if it would have been written with druby, then it would be a little
> > difficult for other clients to connect.
> > Thanks for help Zed.
> 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