Presentation is loading. Please wait.

Presentation is loading. Please wait.

FPL FAST Tech Summit London January 20061 FAST Technical Crash course public CFASTSerdes() { } /// /// Gets the presence map for a tag. /// /// CODEC being.

Similar presentations


Presentation on theme: "FPL FAST Tech Summit London January 20061 FAST Technical Crash course public CFASTSerdes() { } /// /// Gets the presence map for a tag. /// /// CODEC being."— Presentation transcript:

1 FPL FAST Tech Summit London January 20061 FAST Technical Crash course public CFASTSerdes() { } /// /// Gets the presence map for a tag. /// /// CODEC being used for the serialisation /// Tag /// Presence map public override uint get_map(CCodec Codec, uint tag) { int pos = (int) (CCodec.get_tag_slot(tag) + Codec.Config.pmap_offset); Debug.Assert(pos <= CCodec.MAX_TAG); if (pos >= Codec.map_size) return 0; if ((Codec.map_data [pos / 7] & (0x40 >> pos % 7)) != 0) return 1; else return 0; }

2 How does FAST work? Technical Crash Course Kevin Houstoun Global Message Consultant HSBC Without code Co Chair Global FIX Technical Committee

3 FPL FAST Tech Summit London January 20063 Agenda FAST Vocabulary FAST Transfer Encoding Fields SBIT Details Messages FAST Field Encoding FAST Templates FAST Field Data Types An Example

4 FPL FAST Tech Summit London January 20064 FAST Protocol Characteristics Basic Feature Set Optimized for message streams Content aware (requires knowledge about message structure) Byte-oriented binary representation Variable-length fields Each message contains one or more fields A presence map enables efficient use of default values Several ways of deriving default values Empirically validated Very fast processing (encoding / decoding) High compression ratios on tested exchange feeds Simple implementation Extensible

5 FPL FAST Tech Summit London January 20065 FAST Protocol Layers

6 FPL FAST Tech Summit London January 20066 FAST Vocabulary (1) A data stream consists of a sequence of messages. A message consists of a sequence of one or more fields. A field consists of a sequence of one or more bytes. Wire format refers to the byte representation that is used to transfer data on the wire. Encoding is the process of translating to wire format. Decoding is the process of translating from wire format. A CODEC (enCOder/DECoder) provides support for encoding or decoding a stream of messages.

7 FPL FAST Tech Summit London January 20067 FAST Vocabulary (2) A byte consists of seven data bits and a stop bit (the ‘SBIT’) that when set indicates the byte is the last byte of a field. A presence map (‘PMAP’) is a field that is interpreted as a vector of bits, one bit (‘PBIT’) for each field in a message. A field operator enables previous values to be reused.

8 FPL FAST Tech Summit London January 20068 FAST Transfer Encoding – Fields 7 bits 14 bits 21 bits nn bits

9 FPL FAST Tech Summit London January 20069 FAST Transfer Encoding – SBIT Details SBIT coding provides space efficient delimitation of fields More compact than byte delimiter for fields shorter than 7 bytes Empirical data shows average FAST field sizes of ~2 bytes ~33% more compact than a byte delimiter at 2 bytes Serialization of SBIT format is simple and efficient There are exceptional cases when SBIT coding is suboptimal Byte vector can be used for these cases

10 FPL FAST Tech Summit London January 200610 FAST Transfer Encoding – Messages The tail of a pmap may be compressed The number of fields in a message depends on the pmap content A message may be as short as one byte (an empty pmap)

11 FPL FAST Tech Summit London January 200611 FAST Field Data Types Unsigned Integer Signed Integer Scaled Number ASCII String Bit Vector The FAST transport representation supports unlimited size fields. Implementations will likely limit the supported size to match the native data representation in applications.

12 FPL FAST Tech Summit London January 200612 Unsigned Integer Transfer Representation Value(hex)Seven Data Bits per Byte (bin)Len 1270000007F0000000 0000000 0000000 0000000 11111111 1638300003FFF0000000 0000000 0000000 1111111 11111112 2097151001FFFFF0000000 0000000 1111111 1111111 11111113 2684354510FFFFFFF0000000 1111111 1111111 1111111 11111114 4294967295FFFFFFFF0001111 1111111 1111111 1111111 11111115

13 FPL FAST Tech Summit London January 200613 Signed Integer Transfer Representation Value(hex)Seven Data Bits per Byte (bin)Len 0000000000000000 0000000 0000000 0000000 00000001 630000003F0000000 0000000 0000000 0000000 01111111 819100001FFF0000000 0000000 0000000 0111111 11111112 1048575000FFFFF0000000 0000000 0111111 1111111 11111113 13421772703FFFFFF0000000 0111111 1111111 1111111 11111114 21474836477FFFFFFF0000111 1111111 1111111 1111111 11111115 FFFFFFFF1111111 1111111 1111111 1111111 11111111 -64FFFFFFC01111111 1111111 1111111 1111111 10000001 -8192FFFFE0001111111 1111111 1111111 1000000 00000002 -1048576FFF000001111111 1111111 1000000 0000000 00000003 -134217727F80000001111111 1000000 0000000 0000000 00000004 -2147483648800000001111000 0000000 0000000 0000000 00000005

14 FPL FAST Tech Summit London January 200614 Scaled Number Transfer Representation A scaled number is represented using an exponent and a mantissa number = mantissa * 10 ^ exponent The mantissa and exponent are represented as signed integers A base 10 exponent is used to provide exact decimal representation Examples MantissaExponentValue 0-1*10^0 = -1 127-2127*10^-2 = 1.27 141*10^4 = 10000

15 FPL FAST Tech Summit London January 200615 A Transfer Encoding Example BeginStr SeqNum SenderID SendingTime Price Symbol 8=FIX.4.4|34=10000|49=CLIENT1|52=20060126-13:06:58.100|44=1200|55=FOO1| 8=FIX.4.4|34=10001|49=CLIENT1|52=20060126-13:06:58.200|44=1210|55=FOO1| 8=FIX.4.4|34=10002|49=CLIENT1|52=20060126-13:06:58.300|44=1190|55=BAR2| Original size 71 bytes FIX.4.4|10000|CLIENT1|20060126-13:06:58.100|1200|FOO1| FIX.4.4|10001|CLIENT1|20060126-13:06:58.200|1210|FOO1| FIX.4.4|10002|CLIENT1|20060126-13:06:58.300|1190|BAR2| FIX.4.4nnCLIENT120060126-13:06:58.100nnFOO1 FIX.4.4nnCLIENT120060126-13:06:58.200nnFOO1 FIX.4.4nnCLIENT120060126-13:06:58.300nnBAR2 Implicit Tagging 54 bytes (-24%) SBIT Encoding 48 bytes (-33%) Binary Encoding 43 bytes (-39%) FIX.4.410000CLIENT120060126-13:06:58.1001200FOO1 FIX.4.410001CLIENT120060126-13:06:58.2001210FOO1 FIX.4.410002CLIENT120060126-13:06:58.3001190BAR2

16 FPL FAST Tech Summit London January 200616 Field Operators Constant – Always the same value Increment – Frequently previous value incremented by one Copy – Frequently the same as the previous value Delta – Values differ slightly Default – Frequently a specific value

17 FPL FAST Tech Summit London January 200617 A Field Encoding Example BeginStr SeqNum SenderID SendingTime Price Symbol 8=FIX.4.4|34=10000|49=CLIENT1|52=20060126-13:06:58.100|44=1200|55=FOO1| 8=FIX.4.4|34=10001|49=CLIENT1|52=20060126-13:06:58.200|44=1210|55=FOO1| 8=FIX.4.4|34=10002|49=CLIENT1|52=20060126-13:06:58.300|44=1190|55=BAR2| Original size 71 bytes 10000|CLIENT1|20060126-13:06:58.100|1200|FOO1| 1|200|10|FOO1| 2|300|-20|BAR2| Field Encoding First message = 46 bytes (-35%) Subsequent messages = 14 bytes (-80%) Default Copy Or Constant Increment Delta x2

18 FPL FAST Tech Summit London January 200618 Compact Notation 8s!FIX.4.4|9u|35s!X|49s=|34u+1|268u Template Entry FIX Field NameField Encode Operation Data TypeDescription of Operation 8s!FIX4.4BeginStringDefault ValueStringDefault BeginString to the string value of “FIX4.4” 9uBodyLengthNoneUnsigned integerAlways explicitly specify the value of BodyLength 35s!XMessageTypeDefault ValuestringDefault MessageType to the string value of “X” 49s=SenderCompIDCopy CodeStringCopy SenderCompID from the prior occurrence 34u+1SequenceNumberIncrementUnsigned integerIncrement SequenceNumber by +1 from the prior occurrence 268uNoMDEntriesNoneUnsigned integerAlways explicitly specify the value of NoMDEntries 279u=MDUpdateActionCopy CodeUnsigned IntegerCopy MDUpdateAction from the prior occurrence 269s=MDEntryTypeCopyCodeStringCopy MDEntryType from the prior occurrence 55s=SymbolCopyCodeStringCopy Symbol from the prior occurrence 167s=SecurityTypeCopyCodeStringCopy SecurityType from the prior occurrence 270F-MDEntryPriceDelta ValueScaled NumberCalculate the difference from the prior occurrence of MDEntryPrice 271F-MDEntrySizeDelta ValueScaled NumberCalculate the difference from the prior occurrence of MDEntryPrice 346u-NumberOfOrdersDelta ValueUnsigned integerCalculate the difference from the prior occurrence of NumberOfOrders 276s=QuoteConditionCopyCodeStringCopy QuoteCondition from the prior occurrence 277s=TradeConditionCopyCodeStringCopy TradeCondition from the prior occurrence

19 FPL FAST Tech Summit London January 200619 Template Exchange Basic Methods for Template Exchange Out-of-band Basic text file that may be downloaded from a website or emailed from the sender to receiver Side-band Templates are transmitted on a continual basis or in response to request Templates are best represented using clear text In-band Templates are transmitted as part of the primary data feed and the receiver must pick them out of the feed

20 FPL FAST Tech Summit London January 200620 Summary FAST Vocabulary FAST Transfer Encoding Fields SBIT Details Messages FAST Field Encoding FAST Templates FAST Field Data Types An Example


Download ppt "FPL FAST Tech Summit London January 20061 FAST Technical Crash course public CFASTSerdes() { } /// /// Gets the presence map for a tag. /// /// CODEC being."

Similar presentations


Ads by Google