Latin America Electronic Trading Conference 2008 Sao Paolo, Brazilian Mercantile & Futures Exchanges The FAST Protocol SM Optimising the Communication.

Slides:



Advertisements
Similar presentations
The Binary Numbering Systems
Advertisements

Lecture - 2 Number systems and computer data formats
2-1 Chapter 2 - Data Representation Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture.
Chapter 2: Data Representation
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
2015/6/15VLC 2006 PART 1 Introduction on Video Coding StandardsVLC 2006 PART 1 Variable Length Coding  Information entropy  Huffman code vs. arithmetic.
Representations Example: Numbers –145 –CVL – –91 –
Representing Information as Bit Patterns
Chapter 3 Data Representation.
1 Lecture 3 Bit Operations Floating Point – 32 bits or 64 bits 1.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.

Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
8 November Forms and JavaScript. Types of Inputs Radio Buttons (select one of a list) Checkbox (select as many as wanted) Text inputs (user types text)
Chapter 1 Data Storage. 2 Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns.
Data Representation. CMPE12cGabriel Hugh Elkaim 2 Data Representation Goal: Store numbers, characters, sets, database records in the computer. What we.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
15 September How Computers Work: Other Forms of Data.
Number Systems Lecture 02.
Binary Number Systems.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Binary Representation and Computer Arithmetic
Chapter 5 Data representation.
1 Part I: Machine Architecture 4 A major process in the development of a science is the construction of theories that are confirmed or rejected by experimentation.
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Java Primitives The Smallest Building Blocks of the Language (corresponds with Chapter 2)
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
Foundations of Computer Science Computing …it is all about Data Representation, Storage, Processing, and Communication of Data 10/4/20151CS 112 – Foundations.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
Data Representation.
Number Systems Spring Semester 2013Programming and Data Structure1.
Binary, Decimal and Hexadecimal Numbers Svetlin Nakov Telerik Corporation
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Information Representation. Reading and References Reading - Computer Organization and Design, Patterson and Hennessy Chapter 2, sec. 2.4, 2.9 (first.
10-Sep Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Sept Representing Information in Computers:  numbers: counting numbers,
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the number.
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
These notes were originally developed for CpSc 210 (C version) by Dr. Mike Westall in the Department of Computer Science at Clemson.
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
ISBN Chapter 6 Data Types Introduction Primitive Data Types User-Defined Ordinal Types.
Digital Representations ME 4611 Binary Representation Only two states (0 and 1) Easy to implement electronically %0= (0) 10 %1= (1) 10 %10= (2) 10 %11=
CSE 351 Number Representation & Operators Section 2 October 8, 2015.
Data Representation. Goal: Store numbers, characters, sets, database records in the computer. What we got: Circuit that stores 2 voltages, one for logic.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
CSE 351 Number Representation. Number Bases Any numerical value can be represented as a linear combination of powers of n, where n is an integer greater.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
Number Systems and Computer Arithmetic Winter 2014 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Chapter 3: Dataflow Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 3-1 Chapter 3: Dataflow Modeling.
Basic Data Types อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 4.
FPL FAST Tech Summit London January FAST Technical Crash course public CFASTSerdes() { } /// /// Gets the presence map for a tag. /// /// CODEC being.
Binary Addition The simplest arithmetic operation in binary is addition. Adding two single-digit binary numbers is relatively simple, using a form of carrying:
Programming and Data Structure
The Machine Model Memory
Number Representation
Chapter 3 Data Storage.
Binary, Decimal and Hexadecimal Numbers
INTRODUCTION c is a general purpose language which is very closely associated with UNIX for which it was developed in Bell Laboratories. Most of the programs.
Invitation to Computer Science, C++ Version, Third Edition
Representing Information
Bits and Bytes Topics Representing information as bits
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Number Representation & Operators
ECE 120 Midterm 1 HKN Review Session.
Presentation transcript:

Latin America Electronic Trading Conference 2008 Sao Paolo, Brazilian Mercantile & Futures Exchanges The FAST Protocol SM Optimising the Communication of Financial Information

FPL Latin America Electronic Trading Conference Background Increased market data volumes High bandwidth and processing costs Classic FIX Widespread adoption Inadequate performance for Market data Quote driven markets Proprietary Alternatives Complicates integration (many different interfaces) No cost sharing of development and maintenance Limited adoption

FPL Latin America Electronic Trading Conference FAST Protocol Factors that Influenced the Design Efficiency Compression Ratio Resource Consumption (CPU, memory) Ease of Use (Conceptual, Implementation, Operation) Costs Implementation Validation Deployment Operation Maintenance Proof of Concept CME Archipelago ISE Microsoft Singapore Exchange London Stock Exchange

FPL Latin America Electronic Trading Conference 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

FPL Latin America Electronic Trading Conference FAST Protocol Layers

FPL Latin America Electronic Trading Conference FAST Vocabulary 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. 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.

FPL Latin America Electronic Trading Conference FAST Transfer Encoding – Fields 7 bits 14 bits 21 bits nn bits FAST Transfer Encoding - SBIT Detail 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

FPL Latin America Electronic Trading Conference 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)

FPL Latin America Electronic Trading Conference FAST Field Data Types Unsigned Integer Signed Integer Decimal (aka Composite Scaled Number) ASCII Character String UNICODE Character String Bit Vector Byte Vector Additional FAST 1.0 Data types that were dreprecated Unsigned Integer without Null Signed Integer without Null Scaled Number The FAST transport representation supports unlimited size fields. Implementations will likely limit the supported size to match the native data representation in applications.

FPL Latin America Electronic Trading Conference Some helpful refreshers Some important values to remember 0x80 = 128 decimal = b‘ ’ 0x80 is an Octet value of 0x00 with the SBIT (Stop Bit) set 0x7f = 127 decimal = b’ ’ Operations & bitwise AND operation 0x00 & 0x80 => 0x00 0x7f & 0x80 => 0x00 | bitwise OR operation 0x00 | 0x80 => 0x80 0x7f | 0x80 => 0xff

FPL Latin America Electronic Trading Conference For FAST the fundamental data type is the bit SBIT – Stop Bit is the high order bit in the byte set to b’1’ (8 th byte) Bit 7 to indicate the end of a field, b’0’ otherwise DBITS – Bits 6 through 0 contain data

FPL Latin America Electronic Trading Conference Integer Data Types

FPL Latin America Electronic Trading Conference Unsigned Integer Without Null Support Data Type Transfer from low order to high order 7 bits at a time Set the Stop Bit in the low order byte

FPL Latin America Electronic Trading Conference Unsigned Integer Without Null Transfer Encoding Value(hex)Seven Data Bits per Byte (bin)Len F xff FFF x7f 0xff FFFFF x7f 0x7f 0xff FFFFFFF x7f 0x7f 0x7f 0xff FFFFFFFF x0f 0x7f 0x7f 0x7f 0xff 5

FPL Latin America Electronic Trading Conference Unsigned Integer The number is incremented by 1 in the transfer process to account for the NULL value being supported Why is the NULL value 0x00 encoded as 0x80?

FPL Latin America Electronic Trading Conference Signed Integer Data Type Two’s Complement Arithmetic When the 7 bit value is converted to a 32 bit value the first data bit is taken as a sign bit and is copied to the 25 high end bits of the 32 bit value yielding 0xffffffff (which corresponds to in 2’s complement representation). The most significant data bit of the first byte encoded is the sign

FPL Latin America Electronic Trading Conference Signed Integer Transfer Encoding for Positive Values Value(hex)Seven Data Bits per Byte (bin)Len x F xbf FFF x7f 0xff FFFFF x3f 0x7f 0xff FFFFFF x3f 0x7f 0x7f 0xff FFFFFFF x07 0x7f 0x7f 0x7f 0xff 5

FPL Latin America Electronic Trading Conference Signed Integer Transfer Encoding for negative values Value(hex)Seven Data Bits per Byte (bin)Len FFFFFFFF xff 1 -64FFFFFFC xc FFFFE x FFF x40 0x00 0x F x40 0x00 0x00 0x x78 0x00 0x00 0x00 0x80 5

FPL Latin America Electronic Trading Conference Signed Integer with Null Support Still Two’s Complement Arithmetic – does not change for negative numbers Plus, just like with the Unsigned Integer with Null Support Data Type, we get to increment positive values by 1 PLUS ONE ENCODING Good thing we have computers to do this stuff for us

FPL Latin America Electronic Trading Conference FAST Scaled Number (decimal) Data Type Base-10 Single field Requires one field in the PMAP First byte is interpreted as a Signed Integer specifying the Exponent Remaining bytes are treated as a Signed Integer representing the Mantissa Provides exact decimal representation Mantissa X 10 Exponent MantissaExponentValue 0-1*10^0 = *10^-2 = *10^4 = X Obsolete

FPL Latin America Electronic Trading Conference FAST Decimal Datatype aka Composite Scaled Number Data Type MantissaExponentValue 0-1*10^0 = *10^-2 = *10^4 = Base-10 Consists of two fields Requires two places in a PMAP if field encoded Exponent maximum is -63 to +63 Mantissa X 10 Exponent

FPL Latin America Electronic Trading Conference FAST ASCII String Data Type 7 Bit ASCII Character Set Supported Last Byte in string has the Stop Bit set 0x54 0x68 0x61 0x6e 0x6b 0x20 0x59 0x6f 0x75 0x20 0x42 0x4d 0x46 0xa1 What is the decoded string in ASCII?

FPL Latin America Electronic Trading Conference What is in the String? 0x54 0x68 0x61 0x6e 0x6b 0x20 0x59 0x6f 0x75 0x20 0x42 0x4d 0x46 0xa1

FPL Latin America Electronic Trading Conference UnicodeString Datatype Byte Vector Data Type Length specified as a FAST Unsigned Integer Value Length number of Octets follow Full 8 bit values 0x00 – 0xff A NULL Byte Vector is represented by setting the length to Null Can be used for non-ASCII character sets

FPL Latin America Electronic Trading Conference Bit Vector Data Type Series of zero or more continuation bytes followed by one stop byte There is no NULL value defined for this type

FPL Latin America Electronic Trading Conference A Transfer Encoding Example BeginStr SeqNum SenderID SendingTime Price Symbol 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1| 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1| 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2| Original size 71 bytes FIX.4.4|10000|CLIENT1| :06:58.100|1200|FOO1| FIX.4.4|10001|CLIENT1| :06:58.200|1210|FOO1| FIX.4.4|10002|CLIENT1| :06:58.300|1190|BAR2| FIX.4.4nnCLIENT :06:58.100nnFOO1 FIX.4.4nnCLIENT :06:58.200nnFOO1 FIX.4.4nnCLIENT :06:58.300nnBAR2 Implicit Tagging 54 bytes (-24%) SBIT Encoding 48 bytes (-33%) SBIT+Binary Encoding 43 bytes (-39%) FIX CLIENT :06: FOO1 FIX CLIENT :06: FOO1 FIX CLIENT :06: BAR2 Greg

FPL Latin America Electronic Trading Conference Beyond Transfer Encoding Further compaction requires information about data affinity and predictability. BeginStr SeqNum SenderID SendingTime Price Symbol 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2 Affinity Predictability Field Encoding...

FPL Latin America Electronic Trading Conference Templates A template specifies how to encode an application message into the transfer encoding A template conveys Message Structure Data Types Field Operators

FPL Latin America Electronic Trading Conference Template Overview Data Types Field Operators Structure

FPL Latin America Electronic Trading Conference Characteristics of FAST Templates Semantics are formally and unambiguously defined Enables consistent behavior and interoperability among implementations Concrete Syntax Default format for authoring, storing and interchanging templates Human and machine readable XML Syntax Supports evolution of the template specification Extensible – enables inclusion of custom data in templates Widespread knowledge and good tool support Alternative concrete representations Hard coded in encoder and/or decoder FAST encoded as specified by the Session Control Protocol (SCP)

FPL Latin America Electronic Trading Conference The Transfer Encoding Example Revisited BeginStr SeqNum SenderID SendingTime Price Symbol 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1| 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1| 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2| Original size 71 bytes FIX.4.4|10000|CLIENT1| :06:58.100|1200|FOO1| FIX.4.4|10001|CLIENT1| :06:58.200|1210|FOO1| FIX.4.4|10002|CLIENT1| :06:58.300|1190|BAR2| FIX.4.4nnCLIENT :06:58.100nnFOO1 FIX.4.4nnCLIENT :06:58.200nnFOO1 FIX.4.4nnCLIENT :06:58.300nnBAR2 Implicit Tagging 54 bytes (-24%) SBIT Encoding 48 bytes (-33%) Binary Encoding 43 bytes (-39%) FIX CLIENT :06: FOO1 FIX CLIENT :06: FOO1 FIX CLIENT :06: BAR2

FPL Latin America Electronic Trading Conference Data Types Strings, Integer and Decimal numbers, Boolean, Byte Vector Restricted types for numbers – 8-bit up to 64-bit sizes BeginStr SeqNum SenderID SendingTime Price Symbol Sz 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1 44 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1 44 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2 44 Original Size: 71 bytes

FPL Latin America Electronic Trading Conference 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

FPL Latin America Electronic Trading Conference Constant Operator BeginStr SeqNum SenderID SendingTime Price Symbol Sz 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1 37 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1 37 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2 37 Original Size: 71 bytes

FPL Latin America Electronic Trading Conference Increment Operator BeginStr SeqNum SenderID SendingTime Price Symbol Sz 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1 37 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1 35 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2 35 Original Size: 71 bytes

FPL Latin America Electronic Trading Conference Copy Operator BeginStr SeqNum SenderID SendingTime Price Symbol Sz 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1 37 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1 24 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2 28 Original Size: 71 bytes

FPL Latin America Electronic Trading Conference Delta Operator BeginStr SeqNum SenderID SendingTime Price Symbol Sz 8=FIX.4.4|34=10000|49=CLIENT1|52= :06:58.100|44=1200|55=FOO1 37 8=FIX.4.4|34=10001|49=CLIENT1|52= :06:58.200|44=1210|55=FOO1 6 8=FIX.4.4|34=10002|49=CLIENT1|52= :06:58.300|44=1190|55=BAR2 10 Original Size: 71 bytes

FPL Latin America Electronic Trading Conference Naming Names identify messages, templates and fields Names of messages are typically global Maintained by the owner of a protocol, for example FPL Names of templates are typically local Maintained locally by companies using or implementing FAST Standard templates can be maintained by for example FPL Name collision must be avoided Templates use the same method as in Java and XML Names belong to a namespace based on the company domain name

FPL Latin America Electronic Trading Conference Naming Example <templates templateNs=" ns=" … …

FPL Latin America Electronic Trading Conference Additional information Session Control Protocol Version 1.1 More and more vended solutions Majority of FIX engine vendors: ORC, TransactTools, NYFIX, Rapid Addition, and others Open source solutions (Java only) At least two more efforts underway

FPL Latin America Electronic Trading Conference Questions?