Adyle0
-Interested User-
Posts: 10
Joined: Apr 9, 2013
|
Posted: Apr 9, 2013 04:25 AM
Msg. 1 of 9
Could you please elaborate on the usage of the Grouped Message flag?
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Apr 9, 2013 08:33 AM
Msg. 2 of 9
This flag indicates that the messages were generated from a single message from the exchange and that the messages should be processed together before any analysis on the data. It should eliminate any data inconsistancies in depth levels.
|
Adyle0
-Interested User-
Posts: 10
Joined: Apr 9, 2013
|
Posted: Apr 9, 2013 09:15 AM
Msg. 3 of 9
Unless I'm missing something, wouldn't some sort of End Of Bundled Messages indication be necessary? How can you tell all such messages have been received?
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Apr 9, 2013 09:55 AM
Msg. 4 of 9
The flag is only set if the message is part of a group.
So if you get 5 messages with group flags as follows:
Message 1 - Group Flag = F Message 2 - Group Flag = T Message 3 - Group Flag = T Message 4 - Group Flag = T Message 5 - Group Flag = F
You know that messages 2, 3, and 4 all need to be processed before applying any analytics.
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Apr 9, 2013 04:50 PM
Msg. 5 of 9
After thinking about this a bit more, I see the deficiency in the field as it stands currently.
Under the scenario where multiple message groups come in back to back, there is no way to determine the end of one group and the start of the next.
As a result, in the public beta we just posted on the website (IQF 5.0.0.10), we have altered this field to be an End of Message group flag. As a result, the example above will become:
Message 1 - End of Group Flag = T Message 2 - End of Group Flag = F Message 3 - End of Group Flag = F Message 4 - End of Group Flag = T Message 5 - End of Group Flag = T
Indicating that messages 2 and 3 should be processed and analyzed at the end of the group (message 4). Messages 1 and Messages 5 are groups that consist of a single message. Edited by DTN_Steve_S on Apr 9, 2013 at 04:50 PM
|
Adyle0
-Interested User-
Posts: 10
Joined: Apr 9, 2013
|
Posted: Apr 10, 2013 02:48 AM
Msg. 6 of 9
Thank you, that makes much more sense.
Adi
|
taa_dtn
-DTN Evangelist-
Posts: 154
Joined: May 7, 2004
|
Posted: Apr 10, 2013 04:32 PM
Msg. 7 of 9
Steve, just a comment on protocol design...
If anything happens to interfere with the delivery of the record containing the end-of-group flag, the next group will be improperly merged into the previous one. Why not use an incrementing group number instead? That would eliminate the contamination of the next group. If it's ever useful, it would also allow you to interleave delivery of multiple groups (up to the point at which the group number wraps around).
Allen
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Apr 10, 2013 05:17 PM
Msg. 8 of 9
Allen, in IQFeed 5.0, the servers deliver groups to IQFeed in a single message so that is guaranteed to not happen (if an interruption occurs, the entire group will be lost and not just part of it).
Additionally, an incrementing group number (without an End of Group flag) would suffer from having to wait for the next message to arrive after the group ended before you can determine that the group is complete. This was also an issue with our initial implementation but not highlighted in my above post.
|
taa_dtn
-DTN Evangelist-
Posts: 154
Joined: May 7, 2004
|
Posted: Apr 10, 2013 05:31 PM
Msg. 9 of 9
Thanks for the explanation. Yes, as long as you assume groups are delivered reliably, then a termination flag (or an initial record count) is good enough. If you can't make that assumption, then apps will need to terminate a group after a timeout; neither a flag nor a group number is sufficient to solve that case.
Allen
|