FAST Session Control Protocol 11.docx
《FAST Session Control Protocol 11.docx》由会员分享,可在线阅读,更多相关《FAST Session Control Protocol 11.docx(34页珍藏版)》请在冰豆网上搜索。
FASTSessionControlProtocol11
FASTSessionControlProtocol
DRAFT
Version1.1
2007-08-27
StatusofthisDocument
Thisisadraftspecification.
Distribution
Distributionofthisdocumentisunlimited.
CopyrightNotice
Copyright©FIXProtocolLtd.(2005,2006)
Disclaimer
THEINFORMATIONCONTAINEDHEREINANDTHEFINANCIALINFORMATIONEXCHANGEPROTOCOL(COLLECTIVELYTHE“FIXPROTOCOL”)AREPROVIDED“ASIS”ANDNOPERSONORENTITYASSOCIATEDWITHTHEFIXPROTOCOLMAKESANYREPRESENTATIONORWARRANTY,EXPRESSORIMPLIED,ASTOTHEFIXPROTOCOL(ORTHERESULTSTOBEOBTAINEDBYTHEUSETHEREOF)ORANYOTHERMATTERANDEACHSUCHPERSONANDENTITYSPECIFICALLYDISCLAIMSANYWARRANTYOFORIGINALITY,ACCURACY,COMPLETENESS,MERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE.SUCHPERSONSANDENTITIESDONOTWARRANTTHATTHEFIXPROTOCOLWILLCONFORMTOANYDESCRIPTIONTHEREOFORBEFREEOFERRORS.THEENTIRERISKOFANYUSEOFTHEFIXPROTOCOLISASSUMEDBYTHEUSER.
NOPERSONORENTITYASSOCIATEDWITHTHEFIXPROTOCOLSHALLHAVEANYLIABILITYFORDAMAGESOFANYKINDARISINGINANYMANNEROUTOFORINCONNECTIONWITHANYUSER’SUSEOF(ORANYINABILITYTOUSE)THEFIXPROTOCOL,WHETHERDIRECT,INDIRECT,INCIDENTAL,SPECIALORCONSEQUENTIAL(INCLUDING,WITHOUTLIMITATION,LOSSOFDATA,LOSSOFUSE,CLAIMSOFTHIRDPARTIESORLOSTPROFITSORREVENUESOROTHERECONOMICLOSS),WHETHERINTORT(INCLUDINGNEGLIGENCEANDSTRICTLIABILITY),CONTRACTOROTHERWISE,WHETHERORNOTANYSUCHPERSONORENTITYHASBEENADVISEDOF,OROTHERWISEMIGHTHAVEANTICIPATEDTHEPOSSIBILITY,OFSUCHDAMAGES.
NoproprietaryorownershipinterestofanykindisgrantedwithrespecttotheFIXProtocol(oranyrightstherein)exceptasexpresslysetoutinFPL’scopyrightandacceptableusepolicy.
Acknowledgements
…
Abstract
Thisdocumentdefinesasetofmessagesthatareusedtoinitiate,controlandterminatetheexchangeofFASTencodedmessages.ThissetofmessagesisreferredtoastheFASTSessionControlProtocol1.1.TheprotocolincludesmessagesfordynamicexchangeofFASTtemplatedefinitionsanddeclarations.
TableofContents
1Introduction5
1.1StandardNamingandAbbreviations5
1.2Prerequisites6
1.3Notation6
1.4TermsandAcronyms6
2TheSCPNamespace6
3MessagesvsTemplates7
4SessionControlMessages7
4.1Hello7
4.1.1SenderName7
4.1.2VendorId7
4.1.3VersionIdentification7
4.2Alert7
4.2.1Severity8
4.2.2Code8
4.2.3Value8
4.2.4Description8
4.3Reset8
5TransportIndependenceandDictionaries8
6TemplateExchange9
6.1TemplateExchangeMethods9
6.2TemplateExchangeMessages9
6.2.1TemplateDecl9
6.2.2TemplateDef9
7Conformance13
7.1Level113
7.2Level214
7.3Level314
Appendix1TranslationtoXML15
Appendix2Templates19
Appendix3Examples23
DocumentHistory
Version
Date
Author
Description
1.1.
2007-08-27
DavidRosenborg
NewversionofFASTSessionControlProtocol–firstpublicrelease.
Introduction
ThepurposeoftheprotocoldefinedbythisspecificationistoprovidemeansforinitiatingandcontrollingthedecodingprocessinanexchangeofFASTencodedmessages,aFASTsession.
AFASTsessionisinitiatedbysendingaHellomessage.ThemainpurposeofthehellomessageistoindicatewhatversionofFASTisbeingused.Thehellomessagealsocontainsthenameofthesender.Thenamecanbeusedforinformationalpurposesbutmayalsobeusedintheselectionoffeaturesandtemplates.Thisspecificationdoesnotprovidemeansforauthenticationandauthorization.ThoseissuesarebetterhandledbyexistingprotocolslikeSSL.
AFASTsessioncanendinoneoftwoways:
explicitlyorexceptional.AnexplicitterminationisdonebysendinganAlertmessageindicatingtermination.Allotherterminationsareexceptional.Theuseofexplicitterminationfacilitatesdetectionofabnormalconditions.Forexample,iftheunderlyingcommunicationlinkisterminatedbeforeanexplicitterminationissignaled,thereceivercanassumeanerroroccurred.
AkeyfeatureofFASTistheabilitytoavoidsendingdatathathasbeensentbefore.Thisabilityintroducesapossibledependencyinadecoderonpreviouslyreceivedmessages.Ifareliabletransport,likeTCP,isused,thisdependencyisnotaproblemsincemessagescannotbelost.However,whenusinganunreliabletransportlikeUDP,specialcaremustbetakennottohavedependenciesacrossdatagrams.Asaconsequence,thestateofthedecodermustberesetatthebeginningofeachdatagram.Insteadofdefiningimplicitresetsemanticsforallpossibletransportmechanisms,thisspecificationprovidesanexplicitmethodforthispurpose.Itdoesthisbydefiningaresetpropertyfortemplates.InadditionitdefinesamessageReset.Theresetpropertyfortheprovidedtemplateforthismessageisenabled.Thismeansthatwhenusinganunreliabletransport,eachindivisiblesequenceofmessageswouldtypicallystartwithaResetmessageoranyothertemplatethathavetheresetpropertyenabled.
TheFASTSpecificationdefinestheconceptofatemplate.AtemplateisneededtoencodeanddecodeaFASTmessage.Templatescanappearinmanyforms.Theycanforexamplebehardcodedintheencoderanddecoder.Aparticularimplementationmaychoosetoloadtemplateswhentheapplicationstarts.Inthatcasethetemplateshavetypicallybeencommunicatedoutofband.TheFASTSpecificationprovidesaconcreteXMLsyntaxsuitableforthatpurpose.OtherimplementationsmaychoosetodynamicallyexchangetemplatesinbandinaFASTsession.Forthatpurpose,thisspecificationprovidesasetofmessagesthatenablestemplatedefinitionstobeencodedinFAST.
Eachmessageinthisspecificationhasacorrespondingtemplatewithapredefinedtemplateidentifier.ThetemplatesareformallyspecifiedinAppendix2usingtheconcretesyntaxdefinedintheFASTSpecification.
StandardNamingandAbbreviations
Thefollowingnamesandabbreviationsshouldbeusedwhenreferencingthisstandardinotherdocumentsincludingotherstandardsspecificationdocuments.
Notethatwhendiscussingtheprotocol,youarestronglyencouragedtoincludetheversionnumberofthestandardsoastoprovidethecontextandeliminatefuturediscrepanciesastheversionofthestandardsspecificationchanges.Forthatreason,theversionnumberisconsideredanintegralpartofthenameandabbreviationsofthestandard.
Standardnamingandabbreviations
Usage
FASTSessionControlProtocol(SCP)Version1.1
Fullspecificationname
FASTSCP1.1
Fullabbreviation-recommendedfordocumentsthatmayspecifymultiplestandardsorinwhichthecontextofthestandardabbreviationmaybeambiguous
SCP1.1
ContextualabbreviationforusewithinFASTProtocolspecificationsanddocumentsthatsolelyreferenceFASTanddocumentsinwhichthecontextoftheabbreviationisclear.
Prerequisites
Abasicunderstandingofcomputernetworkprotocoltheoryandapplicationisassumed.Inordertofullybenefitfromthisspecification,thereadershouldbefamiliarwiththeFASTencodingstandard,asdefinedbytheFASTSpecification1.1.
Notation
ThelayoutofamessageisdefinedusingasimpleC/Javalikesyntax.Amessageorgrouptypehasanamefollowingthemessageorgroupkeyword.Theonlydifferencebetweengroupandmessagetypesisthatinstancesofamessagemustonlyappearatthetoplevelofastream,whereasinstancesofagroupmustnot.Agrouptypemayextendabasetype.Thenameofthebasetype,ifpresent,followstheextendskeyword.
('message'|'group')Name['extends'Base]
'{'
…
'}'
Atypedefinitionliststhecontainedfieldswithincurlybraces.Eachfieldhasatypeandaname.Thetypeis:
∙oneoftheprimitivetypesasciiString,unicodeString,uInt32,int32,uInt64,int64,decimalandboolean,or
∙astaticgroup,denotedbythenameofthegrouptypeasinOperator,or
∙adynamicgroup,denotedbythenameofabasetypefollowedbyanasteriskasinOperator*,or
∙astaticsequence,denotedbythenameofthegrouptypefortheelementsfollowedbybracketsasinAttribute[],or
∙adynamicsequence,denotedbythenameofabasetypefollowedbyanasteriskandbracketsasinInstruction*[].
AfieldcanbefollowedbyaquestionsigntoindicatethatitisoptionalasinasciiStringDescription?
.Anoptionalfieldiseitherpresentwiththevalueofthespecifiedtype,orhasthespecialvaluenulltoindicatetheabsenceofarealvalue.
Adynamicgroupfieldandanelementofadynamicsequencecancontainanygroupthathasatypethatdirectlyorindirectlyextendsthespecifiedbasetype.
TemplatesaredefinedusingtheconcretesyntaxoftheFASTSpecification1.1.
TermsandAcronyms
Term/Acronym
Description
FASTSession
Abidirectionalinitiation,protocolnegotiation,andsubsequentexchangeofFASTMessages
TheSCPNamespace
Thenamesofmessagetypes,fieldsandtemplatesdefinedinthisdocumentareinanamespacereferredtoastheSCP1.1namespace.TheURIofthisnamespaceis
http:
//www.fixprotocol.org/ns/fast/scp/1.1
MessagesvsTemplates
WhenadecoderdecodesanSCPmessage,thesignificantidentifieristhemessagetype.AsaconsequencethesemanticsoftheSCPprotocolisdefinedintermsofmessagesratherthantemplates.
InthegeneralcasetherecanbemultipletemplatesforasingleSCPmessage.Althoughthisspecificationonlyprovidesasingletemplatepermessage,otherscouldprovideadditionaltemplatesforalternativerenditions.Howthisaffectsaparticularapplicationdependsonitsabilitytodynamicallyacceptnewtemplates.
SessionControlMessages
Hello
HelloisusedatsessioninitiationtoexchangepeernamesandtoindicatetheversionofFAST.Hellomessagesc