Multi-threading/blocking question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Multi-threading/blocking question

Tommy Hannon-3
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
I am using threaded initiators and acceptors along with the message  
cracker...

When processing inside an onMessage(...) method, and presumably  
indirectly the fromApp(...) method, am I blocking incoming messages  
or is there a separate thread "queueing" the incoming messages for  
either the fromApp(...) or onMessage(...)?

Is it okay to send outgoing messages inside an onMessage(...)  
callback or should this be done in a separate thread?

Does anybody recommend best practices for this callback processing?

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Multi-threading/blocking question

Joerg Thoennes
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Hi Tommy,

some time ago there was an issue with cross-blocking threads for a FIX bridge sending messages forth
and back between two sessions directly in the fromApp().

There is no extra queuing in QF/J, but I know that there have been some changes to split larger
critical sections to smaller ones to reduce the chance of deadlocking.

Cheers, Jörg

On 06/14/07 18:59, Tommy Hannon wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> I am using threaded initiators and acceptors along with the message  
> cracker...
>
> When processing inside an onMessage(...) method, and presumably  
> indirectly the fromApp(...) method, am I blocking incoming messages  
> or is there a separate thread "queueing" the incoming messages for  
> either the fromApp(...) or onMessage(...)?
>
> Is it okay to send outgoing messages inside an onMessage(...)  
> callback or should this be done in a separate thread?
>
> Does anybody recommend best practices for this callback processing?
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users


--
Joerg Thoennes
http://www.macd.com                 Tel.: +49 (0)241 44597-24
Macdonald Associates GmbH           Geschäftsführer: Roger Macdonald
Lothringer Str. 52, D-52070 Aachen  Amtsgericht Aachen, HRB 8151, Ust.-Id DE813021663

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Multi-threading/blocking question

Tommy Hannon-3
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Jorg,

Thank you for your reply.  So, even when using the  
ThreadedSocket...tor() approach, there is only one thread per session  
that handles both the network I/O and the fromApp(...) callback.  
Correct?

On Jun 14, 2007, at 12:40 PM, Joerg Thoennes wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Hi Tommy,
>
> some time ago there was an issue with cross-blocking threads for a  
> FIX bridge sending messages forth
> and back between two sessions directly in the fromApp().
>
> There is no extra queuing in QF/J, but I know that there have been  
> some changes to split larger
> critical sections to smaller ones to reduce the chance of deadlocking.
>
> Cheers, Jörg
>
> On 06/14/07 18:59, Tommy Hannon wrote:
>> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
>> QuickFIX/J Support: http://www.quickfixj.org/support/
>> I am using threaded initiators and acceptors along with the message
>> cracker...
>>
>> When processing inside an onMessage(...) method, and presumably
>> indirectly the fromApp(...) method, am I blocking incoming messages
>> or is there a separate thread "queueing" the incoming messages for
>> either the fromApp(...) or onMessage(...)?
>>
>> Is it okay to send outgoing messages inside an onMessage(...)
>> callback or should this be done in a separate thread?
>>
>> Does anybody recommend best practices for this callback processing?
>>
>> ---------------------------------------------------------------------
>> ----
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Quickfixj-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>
>
> --
> Joerg Thoennes
> http://www.macd.com                 Tel.: +49 (0)241 44597-24
> Macdonald Associates GmbH           Geschäftsführer: Roger Macdonald
> Lothringer Str. 52, D-52070 Aachen  Amtsgericht Aachen, HRB 8151,  
> Ust.-Id DE813021663
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users