RE: [Quickfix-developers] ThreadedSocketInitiator vs SocketInitiator
Brought to you by:
orenmnero
|
From: Steve B. <sb...@sm...> - 2006-05-11 05:58:48
|
=20 I vote for removing it or making it a fa=E7ade. In QFJ, the primary difference between the two in a single session scenario are the behavior of the block and poll methods. QFJ uses asynchronous IO (NIO) with low level read/write queues so I don't think it will have this particular problem. However, with queues there is another issue with managing their size under heavy load with a fast producer and slow consumer. Steve > -----Original Message----- > From: qui...@li...=20 > [mailto:qui...@li...] On=20 > Behalf Of Oren Miller > Sent: Wednesday, May 10, 2006 6:01 PM > To: Caleb Epstein; Nick Volpe > Cc: quickfix-developers > Subject: Re: [Quickfix-developers] ThreadedSocketInitiator vs=20 > SocketInitiator >=20 > QuickFIX Documentation:=20 > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html >=20 > Yeah, I'm reading that in unix it is typical to do a fork and=20 > have each=20 > process treat it as unidirectional to avoid deadlocks. So we=20 > would have to=20 > have a thread for sending and a thread for receiving. This=20 > is actually=20 > something we had talked about in the past to prevent=20 > deadlocks when sending=20 > from callbacks. Essentially creating a sending queue. I am=20 > wondering=20 > however if we really do need the SocketInitiator/Acceptor or=20 > if it should be=20 > deprecated in favor of the threaded versions. I think the=20 > precense of both=20 > of them has been one of the more confusing aspects of=20 > QuickFIX and not sure=20 > it really is advantageous to have both at this point. Any=20 > thoughts on this? >=20 > --oren >=20 > ----- Original Message -----=20 > From: "Caleb Epstein" <cal...@gm...> > To: "Nick Volpe" <ni...@ad...> > Cc: "quickfix-developers" <qui...@li...> > Sent: Tuesday, May 09, 2006 11:08 AM > Subject: Re: [Quickfix-developers] ThreadedSocketInitiator vs=20 > SocketInitiator >=20 >=20 > QuickFIX Documentation:=20 > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html >=20 > I don't think this made it through the first time. >=20 > On 5/9/06, Nick Volpe <ni...@ad...> wrote: > > > > Can anyone tell me pros/cons of using a=20 > ThreadedSocketInitiator versus a > > Socket Initiator? I c an't seem to find much in the=20 > documentation or the > > mailing list archives. Any help would be greatly appreciated. >=20 > The non-threaded SocketInitiator can actually get into a deadlock > situation whereby your application will block forever. I would > recommend against anyone ever using it. >=20 > This deadlock will happen if your application fills up a socket's > sending buffer while the other side is doing the same (e.g. two > non-threaded QuickFIX apps generating heavy traffic). Neither side > will end up reading from its side of the socket, being blocked in a > send() call, and both sides will deadlock. >=20 > -- > Caleb Epstein > caleb dot epstein at gmail dot com >=20 >=20 > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job=20 > easier > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=120709&bid&3057&dat=121642 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers >=20 >=20 >=20 > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on=20 > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers >=20 |