[Quickfix-developers] Peacefull coexistence of QuickFix and Twisted/wxPython
Brought to you by:
orenmnero
From: Xavier P. <xav...@lu...> - 2008-04-21 14:49:39
|
Hello List, This is my first post to the list and i have a bunch of questions. If this is not the correct list to post please tell me so i post it in quickfix-users As an introduction, i'm new to QuickFix but not to Fix. We have been using our own C++ fix engine that is not very easy to maintain and make evolutive and we are willing to replace it with QuickFix. This should not give us to much headaches in the C++ world but my problem right now is related to the python wrappers. We are using the QuickFix python wrappers and would like to use them in a wxPython application. The trouble comes from the fact that both wxPython and QuickFix have their own event loop. I read some previous thread about the peacefull coexistence of twisted and the python wrappers, but didn't get the end conclusion (works on linux only?) (Integrate socket connections into application-wide async socket loop) (QuickFIX Python and Twisted) (AHA! : QuickFIX Python and Twisted) We managed to build the python wrappers under windows and we noticed the following : we do get out of fix.SocketInitiator().start() but right after the next system call after that the fix.SocketInitiator event loop take all the cpu. So question 1: Is there a way to 'step' the fix engine, ie something in the path of ----- acceptor = fix.SocketInitiator( application, storeFactory, settings, logFactory ) acceptor.start() while acceptor.isRunning(): acceptor.step() acceptor.stop() Question 2: is it possible to 'feed' the fix engine, ie i take care of all the socket work (open/accept/read/write) and feed the SocketInitiator/SocketAcceptor with the the one thing i can see that gives problem would be a 'callback' for it to write data to the socket. ----- acceptor = fix.SocketInitiator( application, storeFactory, settings, logFactory ) acceptor.setWriteCallback(myWriteCallback) acceptor.start() -- manage my sockets and read data from it into socketData if acceptor.isRunning(): acceptor.data(socketData) Question 3: any other approach that will help me get the QuickFix event loop coexist peacefully with twisted or wxPython BTW we have developper resources to devote to this pb, and i think it would be more interesting to solve this pb in QuickFix, than to redevelop (once more) our own python version of it (we only have 8 messages to implement and doing it from what we have in pure python should be in the 10-15 days work) plateform : Python2.4 win32 QuickFix 1.12.4 (stock) Any pointer(s) would be greatly appreciated. Thanks, Fugazy |