[Quickfix-developers] Reconnection of initiators - sequel
Brought to you by:
orenmnero
From: <ia...@ya...> - 2004-01-14 12:37:28
|
Hi Oren, I don't think the problem comes from " isSameSession ", we rewrote this function entirely for our purpose, but there is a solution in the OnStart member function of ThradedSocketInitiator class: OnStart() makes only one call to Initiator::connect(), before doing a loop that ends when the thread is killed. If The connect() function is also called in the loop, it works well, but I am not sure whether the call to connect() so often will have an impact on the performances of the application, or even on its correct behaviour (do we enter the for loop when all sessions are up ?). Could you give me more precisions on this? regards yann qui...@li... wrote: Send Quickfix-developers mailing list submissions to qui...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/quickfix-developers or, via email, send a message with subject or body 'help' to qui...@li... You can reach the person managing the list at qui...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Quickfix-developers digest..." Today's Topics: 1. no reconnection with ThreadedSocketInitiator (=?iso-8859-1?q?yann=20vermeulen?=) 2. RE: no reconnection with ThreadedSocketInitiator (Vitor Castro) 3. RE: no reconnection with ThreadedSocketInitiator (Oren Miller) 4. Re: Version neutral message cracker? (Oren Miller) --__--__-- Message: 1 Date: Mon, 12 Jan 2004 18:02:22 +0100 (CET) From: =?iso-8859-1?q?yann=20vermeulen?= To: qui...@li... Subject: [Quickfix-developers] no reconnection with ThreadedSocketInitiator --0-362637585-1073926942=:71572 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi all, I have Quickfix running on Sun Solaris, and I have a problem with initiators: when the process is started out of the session times, it does not try to connect to the server when the session start time is reached. I remember using versions of Quickfix knowing no problem with reconnections for initiators, has something changed in the code ? Is there a way to guarantee the reconnection? thanks yann --------------------------------- Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Testez le nouveau Yahoo! Mail --0-362637585-1073926942=:71572 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi all, I have Quickfix running on Sun Solaris, and I have a problem with initiators: when the process is started out of the session times, it does not try to connect to the server when the session start time is reached. I remember using versions of Quickfix knowing no problem with reconnections for initiators, has something changed in the code ? Is there a way to guarantee the reconnection? thanks yann --------------------------------- Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Testez le nouveau Yahoo! Mail --0-362637585-1073926942=:71572-- --__--__-- Message: 2 From: "Vitor Castro" To: "'yann vermeulen'" , Subject: RE: [Quickfix-developers] no reconnection with ThreadedSocketInitiator Date: Tue, 13 Jan 2004 09:13:23 -0000 Organization: HiperBit This is a multi-part message in MIME format. ------=_NextPart_000_002D_01C3D9B5.7ECA21F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Yann, =20 That problem doesn't occur only on Solaris, I'm using windows and I get = the same behaviour. I don't know if that's the case but in my installation I also get the annoying problem, to say the least, that after the end of = the session the initiator disconnects and keeps connecting and disconnecting = all the way to the start of the next session. Of course the sequence numbers = get quite out of sync in the process. I already had posted the problem a few weeks back but got no pointers as = to fix the problem and get the behaviour that previous versions of QF had, = so I had to implement a session scheduler that checks for the session times = and starts/stops the engines as needed. I'd would also like to ear the opinion from the more experience guys = here on the list about this. =20 thanks =20 Vitor Castro | DIS =20 _____ =20 From: qui...@li... [mailto:qui...@li...] On Behalf Of = yann vermeulen Sent: segunda-feira, 12 de Janeiro de 2004 17:02 To: qui...@li... Subject: [Quickfix-developers] no reconnection with = ThreadedSocketInitiator Hi all, =20 I have Quickfix running on Sun Solaris, and I have a problem with initiators: when the process is started out of the session times, it = does not try to connect to the server when the session start time is reached. =20 I remember using versions of Quickfix knowing no problem with = reconnections for initiators, has something changed in the code ? Is there a way to guarantee the reconnection? thanks =20 yann _____ =20 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran=E7ais ! Testez le nouveau Yahoo! Mail ------=_NextPart_000_002D_01C3D9B5.7ECA21F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable charset=3Diso-8859-1"> size=3D2>class=3D115210509-13012004>Hi Yann, size=3D2>class=3D115210509-13012004> size=3D2>class=3D115210509-13012004>That problem doesn't occur only on Solaris, = I'm using=20 windows and I get the same behaviour. I don't know if that's the case = but in my=20 installation I also get the annoying problem, to say the least, = that after=20 the end of the session the initiator disconnects and keeps connecting = and=20 disconnecting all the way to the start of the next session. Of course = the=20 sequence numbers get quite out of sync in the = process. size=3D2>class=3D115210509-13012004>I already had posted the problem a few weeks = back but=20 got no pointers as to fix the problem and get the behaviour that = previous=20 versions of QF had, so I had to implement a session scheduler that = checks for=20 the session times and starts/stops the engines as = needed. size=3D2>class=3D115210509-13012004>I'd would also like to ear the opinion from = the more=20 experience guys here on the list about this. size=3D2>class=3D115210509-13012004> size=3D2>class=3D115210509-13012004>thanks align=3Dcenter>style=3D"FONT-SIZE: 10pt; COLOR: #130e7c; FONT-FAMILY: 'Trebuchet MS'; = mso-ansi-language: PT">Vitor=20 Castro | DIS style=3D"FONT-SIZE: 7.5pt; COLOR: #170d73; FONT-FAMILY: Verdana; = mso-ansi-language: PT"><style=3D"FONT-SIZE: 7.5pt; COLOR: gray; FONT-FAMILY: Verdana; = mso-ansi-language: PT">href=3D"mailto:vc...@hi...">mailto:vc...@hi...= style=3D"FONT-SIZE: 7.5pt; COLOR: #170d73; FONT-FAMILY: Verdana; = mso-ansi-language: PT">>style=3D"FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Trebuchet MS'; = mso-ansi-language: PT">prefix =3D o ns =3D "urn:schemas-microsoft-com:office:office"=20 /> --------------------------------- From:=20 qui...@li...=20 [mailto:qui...@li...] On Behalf Of = yann vermeulen Sent: segunda-feira, 12 de Janeiro de 2004=20 17:02 To: = qui...@li... Subject:=20 [Quickfix-developers] no reconnection with=20 ThreadedSocketInitiator Hi all, I have Quickfix running on Sun Solaris, and I have a problem with=20 initiators: when the process is started out of the session times, it = does not=20 try to connect to the server when the session start time is = reached. I remember using versions of Quickfix knowing no problem with = reconnections=20 for initiators, has something changed in the code ? Is there a way to = guarantee=20 the reconnection? thanks yann --------------------------------- Do You Yahoo!? -- Une adresse @yahoo.fr = gratuite et en=20 fran=E7ais ! Testez le nouveau = Yahoo!=20 Mail ------=_NextPart_000_002D_01C3D9B5.7ECA21F0-- --__--__-- Message: 3 Date: Tue, 13 Jan 2004 06:25:34 -0800 (PST) From: Oren Miller Subject: RE: [Quickfix-developers] no reconnection with ThreadedSocketInitiator To: Vitor Castro , 'yann vermeulen' , qui...@li... I believe this describes a problem that has been fixed in the repository. The problem was that isSameSession was not cummutative causing a certain order of parameters to always return true, thus never ending the session. Here is a link to the fix: http://cvs.sourceforge.net/viewcvs.py/quickfix/quickfix/src/C%2B%2B/Session.cpp?r1=1.25&r2=1.26 as well as the new test case: http://cvs.sourceforge.net/viewcvs.py/quickfix/quickfix/src/C%2B%2B/test/SessionTestCase.cpp?r1=1.7&r2=1.8 --- Vitor Castro wrote: > Hi Yann, > > That problem doesn't occur only on Solaris, I'm > using windows and I get the > same behaviour. I don't know if that's the case but > in my installation I > also get the annoying problem, to say the least, > that after the end of the > session the initiator disconnects and keeps > connecting and disconnecting all > the way to the start of the next session. Of course > the sequence numbers get > quite out of sync in the process. > I already had posted the problem a few weeks back > but got no pointers as to > fix the problem and get the behaviour that previous > versions of QF had, so I > had to implement a session scheduler that checks for > the session times and > starts/stops the engines as needed. > I'd would also like to ear the opinion from the more > experience guys here on > the list about this. > > thanks > > > Vitor Castro | DIS > > > > > _____ > > From: > qui...@li... > [mailto:qui...@li...] > On Behalf Of yann > vermeulen > Sent: segunda-feira, 12 de Janeiro de 2004 17:02 > To: qui...@li... > Subject: [Quickfix-developers] no reconnection with > ThreadedSocketInitiator > > > Hi all, > > I have Quickfix running on Sun Solaris, and I have a > problem with > initiators: when the process is started out of the > session times, it does > not try to connect to the server when the session > start time is reached. > > I remember using versions of Quickfix knowing no > problem with reconnections > for initiators, has something changed in the code ? > Is there a way to > guarantee the reconnection? > thanks > > yann > > > > > _____ > > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et > en français ! > Testez le nouveau Yahoo! > Mail > __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus --__--__-- Message: 4 Date: Tue, 13 Jan 2004 07:26:10 -0800 (PST) From: Oren Miller Subject: Re: [Quickfix-developers] Version neutral message cracker? To: John Muehlhausen , qui...@li... --0-1206960398-1074007570=:15978 Content-Type: text/plain; charset=us-ascii If you intend on writing a significant amount of code, then the message cracker may not be the best choice. Instead you can just check the MsgType yourself and work without the type system. Or you may want to use the cracker delegate the non version specific code. For instance: onNewOrderSingle( const Message&, const SessionID& ) { // common code between versions } onMessage( const FIX41::NewOrderSingle&, const SessionID& ) { onNewOrderSingle( ... ); // version specific code } onMessage( const FIX42::NewOrderSingle&, const SessionID& ) { onNewOrderSingle( ... ); // version specific code } The problem with a version neutral cracker is there really is no relationship between the same messages in different versions, so there isn't really in inheritence structure. In fact I believe, though not sure, some messages may have even changed names between versions which makes things a little tricky. Otherwise such a cracker would be possible to generate, but the use of the type system would not be an option. An example of version neutral code in QuickFIX can be found in Session.cpp. Versions are only checked when there is different behavior. This file may give you some ideas on how to handle this. John Muehlhausen wrote: Forgive me if this should be obvious: Is there a message cracker that is version neutral? It seems that this would be handy when the message handling is almost the same across versions, which is usually the case. ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers --------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes --0-1206960398-1074007570=:15978 Content-Type: text/html; charset=us-ascii If you intend on writing a significant amount of code, then the message cracker may not be the best choice. Instead you can just check the MsgType yourself and work without the type system. Or you may want to use the cracker delegate the non version specific code. For instance: onNewOrderSingle( const Message&, const SessionID& ) { // common code between versions } onMessage( const FIX41::NewOrderSingle&, const SessionID& ) { onNewOrderSingle( ... ); // version specific code } onMessage( const FIX42::NewOrderSingle&, const SessionID& ) { onNewOrderSingle( ... ); // version specific code } The problem with a version neutral cracker is there really is no relationship between the same messages in different versions, so there isn't really in inheritence structure. In fact I believe, though not sure, some messages may have even changed names between versions which makes things a little tricky. Otherwise such a cracker would be possible to generate, but the use of the type system would not be an option. An example of version neutral code in QuickFIX can be found in Session.cpp. Versions are only checked when there is different behavior. This file may give you some ideas on how to handle this. John Muehlhausen <jg...@jg...> wrote: Forgive me if this should be obvious: Is there a message cracker that is version neutral? It seems that this would be handy when the message handling is almost the same across versions, which is usually the case. ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers --------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes --0-1206960398-1074007570=:15978-- --__--__-- _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers End of Quickfix-developers Digest --------------------------------- Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Testez le nouveau Yahoo! Mail |