Re: [Quickfix-developers] Peacefull coexistence of QuickFix and Twisted/wxPython
Brought to you by:
orenmnero
From: <or...@qu...> - 2008-04-21 15:11:32
|
<html><body><div>Answer 1:</div> <div>There are three ways to run the engine. These are done via the start(), block(), and poll() calls. Poll will do what you are looking for I think. It will process any waiting events and then return, so you could run multiple message loops that way.</div> <div> </div> <div>Answer 2:</div> <div>There is currently no way to feed outside sockets into the QuickFIX event loop. This is something we can look into, you aren't the first to ask about this.<BR></div> <div>Answer 3:<BR>I'm not entirely sure, but I am really curious as to why calling start is pegging your cpu. This should simply be blocking in another thread. There really shouldn't be anything going on with the cpu unless there are events to process. Any idea what is going on here?</div> <BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid" webmail="1"> <div>So question 1:<BR>Is there a way to 'step' the fix engine, ie something in the path of<BR>-----<BR>acceptor = fix.SocketInitiator( application, storeFactory, <BR>settings, logFactory )<BR>acceptor.start()<BR>while acceptor.isRunning():<BR>acceptor.step()<BR>acceptor.stop()<BR></div> <div>Question 2:<BR>is it possible to 'feed' the fix engine, ie i take care of all the <BR>socket work<BR>(open/accept/read/write) and feed the SocketInitiator/SocketAcceptor <BR>with the<BR>the one thing i can see that gives problem would be a 'callback' for <BR>it to<BR>write data to the socket.<BR>-----<BR>acceptor = fix.SocketInitiator( application, storeFactory, <BR>settings, logFactory )<BR>acceptor.setWriteCallback(myWriteCallback)<BR>acceptor.start()<BR>-- manage my sockets and read data from it into socketData<BR>if acceptor.isRunning():<BR>acceptor.data(socketData)<BR><BR>Question 3:<BR>any other approach that will help me get the QuickFix event loop <BR>coexist peacefully<BR>with twisted or wxPython<BR><BR>BTW we have developper resources to devote to this pb, and i think it would<BR>be more interesting to solve this pb in QuickFix, than to redevelop <BR>(once more) our own<BR>python version of it (we only have 8 messages to implement and doing it from<BR>what we have in pure python should be in the 10-15 days work)</div></BLOCKQUOTE></body></html> |