|
|
|
Tod Harter
|
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/ Hmmm, yeah, hmmmm. Performance implications? First I would set the Connection AutoCommit to false. -- The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Quickfixj-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quickfixj-users |
||||||||||||||||
|
vstolea
|
Some javascript/style in this post has been disabled (why?)
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/QuickFIX/J Support: http://www.quickfixj.org/support/ I'm not concerned about performance yet. What I need, is to be sure there's no way we'll ever get in the situations described in my initial post - which are: A - the lost of a message from a client (overwritten in the messages table) wich I won't be able to recover (table updates not in a single transaction). B - wrong values in the database compared with what the app has in the MemoryStore (two threads updating both sequence numbers when the message processor and the timer should update only the incoming and the sending thread only the outgioing) The reuse of the prepared statement would eliminate some time spent in preparing the statement (10-15 ms in our case) that are now used on each and every db call. Thanks! ===========Tod Harter================= Hmmm, yeah, hmmmm. Performance implications? First I would set the Connection AutoCommit to false.
===========Original Message================= This message is long - please bear with me. Hi, I have a few questions regarding the quickfix/j engine and it's JdbcStore (the one we're using).
1. Why the message is first sent to the executor and then stored? 2. Why are the two statements (insert_message and update_sequnece_number) NOT executed in a single transaction or somehow atomic? 3. Why is only one statement that updates both sequence numbers (incoming and outgoing) and not two statements that would deal with each one since the call is from different threads ()? 4. Why are the sql statements prepared each time after a connection is aquired? Now some arguments ================== For #1
For #2 First I would set the Connection AutoCommit to false.
if (persistMessages) {
I would rather have it as: if (persistMessages) {
The state.persist(...) would call a new method messageStore.persist(sequence, message); The messageStore.persist(sequence, message) would get a connection from the pool, open a transaction, insert the message in the messages table, update the sequence number, then commit or rollback based on success/failure and return a code to the caller. All that would happen before the actual socket send. For #3
c) the executor sends back a report and updates the sequence numbers with the values it gets from the MemoryStore. d) the sending thread is finally scheduled and updates the sequence numbers with the values it already got from the MemoryStore, thus setting an old value for the incoming message sequence number. If there would be a separate statement for each sequence number update, the above would not happen. For #4
Thanks for your time.
--- ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Quickfixj-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quickfixj-users |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |