RE: [Quickfix-developers] ThreadedSocketInitiator vs SocketInitiator
Brought to you by:
orenmnero
|
From: Sean K. <sea...@pi...> - 2006-05-30 12:57:44
|
Hi Steve, I understand your concerns. Guaranteeing message sequencing for a = session becomes more complicated with a thread pool and message queue. = Each session would need some kind of locking mechanism (a mutex would do = the trick), that could be locked when a worker thread is processing the = session's message queue. My thoughts were that it would be useful to = have a set of incoming worker threads and outgoing worker threads. Each = session could then have both an incoming and outgoing queue for messages = that would be processed the same way. That way, any outgoing messages = (even those sent from callback functions) would be written to the = outgoing queue and picked up by a worker thread when all prior outgoing = messages have been sent. This would hopefully eliminate the possibility = of deadlocks. It's just very important not to starve any of the = sessions while processing a queue for a very busy connection... Anyone have additional thoughts / comments / concerns? --Sean -----Original Message----- From: qui...@li... [mailto:qui...@li...]On Behalf Of Steve Bate Sent: Monday, May 29, 2006 4:32 AM Cc: quickfix-developers Subject: RE: [Quickfix-developers] ThreadedSocketInitiator vs SocketInitiator QuickFIX Documentation: = http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Hi Sean, One complication of a thread pool approach is that we must be sure that the messages for each session are processed in sequence. We can't just dispatch each received message to a thread in the=20 pool. One solution is to maintain a queue for each session and=20 then dispatch the queues to a thread pool. The worker threads=20 would process one or more messages (could be configurable)=20 each time they take a session queue for processing. Do you have any other ideas how to implement an thread pool initiator/acceptor? Do any of the threading experts out there know of an applicable pattern for this scenario? Steve > -----Original Message----- > From: qui...@li...=20 > [mailto:qui...@li...] On=20 > Behalf Of Sean Kirkpatrick > Sent: Friday, May 12, 2006 11:00 PM > To: Oren Miller; Brian Erst; 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 > May I suggest that there also be a thread pool option? If an=20 > acceptor has hundreds of sessions configured, it won't be a=20 > good idea to spawn a thread per session... >=20 > --Sean >=20 > -----Original Message----- > From: qui...@li... > [mailto:qui...@li...]On=20 > Behalf Of Oren Miller > Sent: Wednesday, May 10, 2006 12:56 PM > To: Brian Erst; Caleb Epstein; Nick Volpe > Cc: quickfix-developers > 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 > There was, however it was overrun by WikiSpam and I never got=20 > around to researching solutions to the problem. >=20 > --oren >=20 > > p.s. Speaking of confusion, is there a QuickFIX wiki? While the=20 > > existing documentation is sufficient for getting started,=20 > in order to=20 > > really understand a lot of QF you have to read the mailing list=20 > > archives. If we had a wiki, I'd be tempted to transfer at=20 > least some=20 > > of the mailing list knowledge to the wiki, if only from an=20 > ongoing basis. >=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=20 > v.1.0.1 based on 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 >=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=20 > v.1.0.1 based on 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 ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications = in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=107521&bid$8729&dat=121642 _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |