rfc2371.Transaction Internet Protocol Version 3.0
- 格式:pdf
- 大小:40.60 KB
- 文档页数:31
rfc异常处理流程RFC 异常处理流程引言在网络通信中,RFC(Request for Comments)扮演着重要的角色,它是一系列由互联网工程任务组(IETF)发布的文件,用于制定互联网标准和协议。
然而,在实际应用中,由于各种原因,可能会出现异常情况,需要进行相应的处理。
本文将针对RFC异常处理流程进行详细的介绍和分析。
一、异常情况的分类我们需要对RFC异常情况进行分类。
根据RFC文件的不同用途和内容,可以将异常情况划分为以下几类:1. 语法错误:当一个RFC文件的语法格式违反了规定,无法被正确解析时,就会发生语法错误。
这可能是由于拼写错误、缺少必要的标点符号、格式错误等原因引起的。
2. 逻辑错误:逻辑错误是指RFC文件中的描述与实际需求或规范不一致的情况。
这可能导致协议无法正常工作或产生不符合预期的结果。
3. 安全漏洞:由于互联网环境的复杂性和恶意攻击的存在,RFC文件中可能存在与安全相关的漏洞。
这些漏洞可能会被黑客利用,造成严重的安全威胁。
4. 性能问题:RFC文件中的某些规定可能会导致性能下降或资源浪费,这种情况可能需要进行调整或优化。
5. 兼容性问题:当一个RFC文件与已有的标准或协议不兼容时,就会出现兼容性问题。
这可能导致不同系统之间的通信故障或数据丢失。
二、异常处理流程针对不同的异常情况,我们需要采取不同的处理措施。
下面是一个基本的RFC异常处理流程:1. 异常检测:在应用RFC文件之前,我们需要对其进行严格的检测,以确保其符合语法规范和逻辑要求。
可以使用一些自动化的工具或脚本来进行检测,以提高效率和准确性。
2. 异常定位:一旦发现异常情况,我们需要对其进行定位,找出具体的错误或问题所在。
这可能需要仔细分析RFC文件的内容和相关的标准规范,以确定异常的原因和影响范围。
3. 异常修复:根据异常的类型和具体情况,我们需要制定相应的修复方案。
对于语法错误,可以通过修正拼写错误、添加或删除标点符号等方式进行修复;对于逻辑错误,可能需要修改相关的描述或规定,以保证与实际需求或规范的一致性。
Internet Message Access Protocol (IMAP) is an email retrieval protocol. It stores email messages on a mail server and enables the recipient to view and manipulate them as though they were stored locally on their device. IMAP was developed in the late 1980s and has since become one of the most widely used email retrieval protocols.The IMAP standard is defined in RFC 3501, which was published in 2003. This document provides a detailed description of the protocol's functionality, including its data formats, commands, and responses. The standard specifies how IMAP clients and servers should communicate with each other to enable the retrieval and manipulation of email messages.One of the key features of IMAP is its support for multiple clients accessing the same mailbox simultaneously. This is achieved through the use of a "shared" storage model, where all clients see the same set of messages and folders stored on the server. This allows users to access their email from different devices without having to worry about synchronizing their messages manually.Another important aspect of IMAP is its support for message organization and management. Clients can create, delete, and rename folders, as well as move messages between folders. They can also search for specific messages based on various criteria, such as sender, subject, or date.IMAP also provides a range of features for managing individual messages. Clients can mark messages as read or unread, flag them for follow-up, and even move them to a specific folder. They can also reply to messages, forward them to others, and generate replies or forwards with attachments.Overall, the IMAP standard provides a powerful and flexible framework for managing email messages. Its support for shared storage, message organization, and advanced message management features make it a popular choice for both personal and business email users.。
组织:中国互动出版网(/)RFC文档中文翻译计划(/compters/emook/aboutemook.htm)E-mail:ouyang@译者:党红梅(snowlily danghongmei@)译文发布时间:2001-4-27版权:本中文翻译文档版权归中国互动出版网所有。
可以用于非商业用途自由转载,但必须保留本文档的翻译及版权信息。
Network Working Group R. Hinden Request for Comments: 2373 Nokia Obsoletes: 1884 S. Deering Category: Standards Track Cisco Systems July 1998IPv6寻址体系结构(RFC2373: IP Version 6 Addressing Architecture)本备忘录的状态本文档讲述了一种Internet社区的Internet标准跟踪协议,它需要进一步进行讨论和建议以得到改进。
请参考最新版的“Internet正式协议标准”(STD1)来获得本协议的标准化程度和状态。
本备忘录的发布不受任何限制。
版权声明Copyright (C) The Internet Society (1998). All Rights Reserved.摘要本技术规范定义I P v 6的寻址体系结构。
本文件包括I P v 6 寻址模型、I P v 6 地址的文字表示、I P v 6 单播地址、任意点播地址和组播地址的定义以及I P v 6 节点需要的地址。
目录摘要 11.简介 22. IPv6 寻址 22.1 寻址模型 32.2 地址的文本表示 32.3 地址前缀的文本表示 42.4 地址类型表示 52.5 单播地址 52.5.1 接口标识符 62.5.2 未指定地址72.5.3 回返地址72.5.4 嵌有IPv4 地址的IPv6 地址72.5.5 NSAP 地址72.5.6 IPX 地址82.5.7 可集聚全球单播地址82.5.8 本地用IPv6 单播地址82.6 任意点播地址92.6.1要求的任意点播地址92.7 组播地址102.7.1 预定义的组播地址112.7.2 新IPv6 组播地址的分配122.8 节点要求的地址123. 安全性考虑13附录A 创建EUI-64 接口标识符13A.1 具有EUI-64 标识符的链路或节点13A.2 具有IEEE 802 48 位MAC 地址的链路或节点13A.3 具有非全球标识符的链路14A.4 无标识符的链路14附录B 文本表示的ABNF 描述 15附录C 对RFC 1884 的修改15参考资料16作者联系方法17版权说明171.简介本技术规范定义了I P v 6 的寻址体系结构。
RFC821 简单邮件传输协议(SMTP)(RFC821 SIMPLE MAIL TRANSFER PROTOCOL)目录1. 介绍 22. SMTP模型 33. SMTP过程 43.1. MAIL 43.2. 转发 53.3. 确认和扩展 63.4. 发送信件(mailing)和获得信件(sending) 7 3.5. 打开和关闭73.6. 转发 83.7. 域93.8. 改变角色94. SMTP说明94.1. SMTP命令94.1.1. 命令语法94.1.2. COMMAND语法格式134.2. SMTP响应154.3. 命令和应答序列164.4. 状态图174.5. 详细内容184.5.1. 最小实现184.5.2. 透明性194.5.3. 大小19附录 A TCP传输服务19附录 B NCP传输服务20附录 C NITS 20附录 D X.25传输服务 20附录 E 应答码构成方法20附录 F 一些例子22参考资料361. 介绍简单邮件传输协议(SMTP)的目标是可靠高效地传送邮件,它独立于传送子系统而且仅要求一条可以保证传送数据单元顺序的通道。
附录A,B,C和D描述了不同传送服务下SMTP的使用。
在名词表中还定义了本文档中使用的术语。
SMTP的一个重要特点是它能够在传送中接力传送邮件,传送服务提供了进程间通信环境(IPCE),此环境可以包括一个网络,几个网络或一个网络的子网。
理解到传送系统(或IPCE)不是一对一的是很重要的。
进程可能直接和其它进程通过已知的IPCE通信。
邮件是一个应用程序或进程间通信。
邮件可以通过连接在不同IPCE上的进程跨网络进行邮件传送。
更特别的是,邮件可以通过不同网络上的主机接力式传送。
2. SMTP模型SMTP设计基于以下通信模型:针对用户的邮件请求,发送SMTP建立与接收SMTP之间建立一个双向传送通道。
接收SMTP可以是最终接收者也可以是中间传送者。
SMTP命令由发送SMTP发出,由接收SMTP接收,而应答则反方面传送。
rfc相关设置及使用RFC(Request for Comments)是一种用于定义互联网协议、标准和相关问题的文档。
RFC的格式由互联网工程任务组(IETF)统一规定,它们记录了网络技术的发展和演进过程。
在本文中,我们将介绍RFC相关的设置和使用。
1. 了解RFC的作用和历史:RFC是由IETF组织制定的一种标准化文档,它记录了互联网协议的设计、开发和演化过程。
RFC起源于20世纪60年代的ARPANET,是一种社区驱动的文档,通过共享和讨论来推动互联网技术的发展。
RFC文档旨在提供指南、建议和最佳实践,帮助网络技术人员解决问题。
2. 寻找和阅读RFC文档:RFC文档可以在互联网上免费获取,IETF的官方网站和其他资源库都有存档。
这些文档按照顺序编号,并且以RFC开头,比如RFC 791定义了IPv4协议。
通过搜索引擎或在IETF网站上使用关键词搜索,可以找到特定主题的RFC文档。
阅读RFC文档时,应该注意文档的状态,有一些可能已经被更新或废弃。
3. 使用RFC文档:RFC文档在网络技术的发展过程中起着重要的指导作用。
它们提供了协议规范、算法实现、安全性和隐私等方面的建议。
网络管理员、网络工程师和开发人员可以使用RFC文档来了解和理解特定协议或标准的设计原理和要求。
此外,RFC文档还常用于进行互联网协议的实现、编程和配置。
4. 参与RFC的制定过程:RFC并不是静止的文件,而是一个持续演进的过程。
任何人都可以参与到RFC的制定过程中。
要参与RFC的制定,可以加入IETF并参与相关的工作组或邮件列表。
通过这种方式,个人可以提出改进建议,参与讨论和标准化的制定。
5. 遵循RFC的指导原则:在网络技术领域,遵循RFC的指导原则是至关重要的。
这些指导原则包括设计原则、协议分层、安全性和互操作性等要求。
遵循RFC的指导原则可以确保网络协议的正确性、稳定性和可靠性,同时也可以促进网络技术的发展和创新。
总结起来,RFC在互联网技术领域起着重要的作用,它们记录了互联网协议的发展历程和指导原则。
电子商务网络安全技术1. 引言随着互联网的蓬勃发展和社交媒体的普及,电子商务在全球范围内得到了迅猛发展。
然而,随之而来的是各种形式的网络安全威胁。
对于电子商务企业和消费者来说,网络安全是一项重要的任务。
本文将介绍几种常见的电子商务网络安全技术,以帮助企业和消费者保护网络安全。
2. 传输层安全性协议传输层安全性协议(Transport Layer Security,TLS)是保护网络通信安全的重要技术之一。
TLS使用公钥加密算法来加密传输的数据,防止数据在传输过程中被恶意截获和篡改。
同时,TLS还提供身份验证,确保通信双方的身份合法和可信。
常见的应用包括HTTPS协议,用于保护网站与客户端之间的通信安全。
使用TLS可以有效地保护电子商务网站和应用程序的安全,从而保护用户的个人信息和交易数据不被窃取和篡改。
企业可以通过在服务器上配置合适的TLS证书来确保传输的安全性。
同时,用户也可以通过查看网站的TLS证书信息来验证网站的可信度。
3. 多因素身份验证传统的用户名和密码身份验证方式已经逐渐变得不安全,容易被黑客破解和偷取。
为了加强电子商务的安全性,许多企业采用了多因素身份验证技术。
多因素身份验证结合了多个不同的身份验证因素,如密码、指纹、面部识别、短信验证码等。
通过这种方式,即使有人知道用户的密码,也无法轻易访问用户的账户。
多因素身份验证为电子商务网站和应用程序的安全提供了额外的层次保护。
用户在进行登录或支付等敏感操作时,除了输入密码,还需要提供其他身份验证因素,从而增加了黑客攻击的难度。
4. Web应用程序防火墙Web应用程序防火墙(Web Application Firewall,WAF)是一种用于保护Web应用程序的安全设施。
WAF可以监视和过滤进入Web应用程序的流量,防止攻击者利用漏洞进行恶意攻击。
WAF使用一系列安全规则和算法来检测和拦截恶意请求,如SQL注入、跨站脚本攻击等。
电子商务网站和应用程序经常成为黑客攻击的目标,因此使用WAF技术可以大大减少潜在的安全漏洞。
RFC3261(7消息定义)SIP是⼀个基于⽂本的协议,使⽤UTF-8字符集(RFC2279[7])。
⼀个SIP消息既可以是⼀个从客户端到服务器端的请求,也可以是⼀个从服务器端到客户端的⼀个应答。
请求(7.1)和应答(7.2)消息都基于RFC2822格式,只是在字符集上和语法细节上有所不同。
(⽐如SIP允许头域不是标准的RFC2822头域)。
这两种消息类型都由⼀个起始⾏,⼀个或者多个头域,⼀个标明头域结束的回车换⾏,⼀个可选的消息体组成。
⼀般消息=起始⾏*头域CRLF[消息体]起始⾏=请求⾏/状态⾏起始⾏、每⼀个头域字段⾏,空⾏都必须由回车换⾏组成(CRLF)。
即使没有消息体,也必须有⼀个空⾏标明头域的结束。
除了在字符集上的区别以外,很多SIP的消息和头域的格式都和HTTP/1.1⼀样。
我们在这⾥就不重复它的语法和语义了,我们⽤[HX.Y]来标志HTTP/1.1规范(RFC2616[8])的X.Y节的描述。
然后,SIP并⾮⼀个HTTP的扩展。
7.1 请求SIP请求是根据起始⾏中的请求⾏来区分的。
⼀个请求⾏包含Method,Request-URI,和协议版本,彼此之间⽤SP(单个空格)分隔。
请求⾏由CRLF(回车换⾏组合)结束。
除了⽤作⾏结束标志以外,不允许CR或者LF出现在其他地⽅。
在任何元素中,不允许出LWS(任意数量的空格)。
Request-Line = Method SP Request-URI SP SIP-VERSION CRLFMethod: 本规范规定了6中⽅法:REGISTER⽤于登记联系信息,INVITE,ACK,CANCEL⽤于建⽴会话,BYE⽤于结束会话,OPTIONS⽤于查询服务器所提供的能⼒。
在按照RFC标准⽂档化的SIP扩展中可能包含其他的⽅法。
Request-URI: Request-URI是⼀个SIP或者SIPS URI,他们在19.1节由描述。
也可以是⼀个通⽤的URI(RFC 2396[5])。
1.备忘 (3)2.版权申明 (3)3.摘要 (3)4.授权鉴别 (4)4.1.对HTTP/1.1规范的依赖 (4)4.2.访问鉴别框架 (4)5.基本鉴别方案 (6)6.摘要访问鉴别方案 (8)6.1.介绍 (8)6.1.1.目的 (8)6.1.2.操作概述 (8)6.1.3.摘要值的表示 (8)6.1.4.该方案的局限性 (8)6.2.摘要报头的规范 (9)6.2.1.WWW-Authenticate响应报头 (9)6.2.2.Authorization请求报头 (11)6.2.3.Authentication-info报头 (15)6.3.摘要操作 (17)6.4.安全协议讨论 (17)6.5.例子 (18)6.6.代理鉴别和代理授权 (18)7.安全考虑 (20)7.1.客户使用基本鉴别 (20)7.2.客户使用摘要鉴别 (20)7.3.受限的NONCE值使用 (21)7.4.基本鉴别与摘要鉴别的比较 (21)7.5.回放式攻击 (22)7.6.多方鉴别方案产生的缺点 (22)7.7.在线字典攻击 (23)7.8.中间人 (23)7.9.选择纯文本攻击 (23)7.10.预先计算的字典攻击 (24)7.11.批处理方式暴力攻击 (24)7.12.假冒服务器欺骗 (24)7.13.存储口令 (24)7.14.总结 (25)8.例子实现 (26)9.参考书目 (30)10.作者地址 (30)11.完整版权申明 (30)12.致谢 (30)1.备忘本文档跟踪记录Internet团体为完善协议而进行的讨论、建议。
详情请参见官方文件(STD1)。
本文可任意分发。
2.版权申明Copyright (C) The Internet Society (1999). All Rights Reserved3.摘要“HTTP/1.0”中包括基本访问鉴别方案(Basic Access Authentication scheme)。
核心交换机双机热备解决方案一、项目背景稳定持续的系网络系统运行变得越来越重要,而原来有单机核心三层交换数据潜 伏巨大的崩溃风险。
VRRP (虚拟路由冗余协议)技术来解决该问题,以实现主、备核心三层交换设 备之间动态、无停顿的热切换。
二、方案设计:2.1、 简要介绍VRRP 的基本概念。
通常情况下,内部网络中的所有主机都设置一条相同的缺省路由,指向出口网关 (即图1中的交换机S9300A ),实现主机与外部网络的通信。
当出口网关发生 故障时,主机与外部网络的通信就会中断。
图1局域网缺省网关Gateway: 10,0.0.1 IP Address:10,0.0.4/24 4Ethernet 配置多个出口网关是提高系统可靠性的常见方法,但需要解决如何在多个出口网 关之间进行选路的问题。
VRRP (Virtual Router Redundancy Protocol )是 RFC3768 定义的一种容错协议, 通过物理设备和逻辑设备的分离,实现在多个出口网关之间选路,很好地解决了 上述问题。
在具有多播或广播能力的局域网(如以太网)中,VRRP 提供逻辑网关确保高利 用度的传输链路,不仅能够解决因某网关设备故障带来的业务中断,而且无需修 改路由协议的配置。
2.2、 V RRP 工作原理:S93OOAGateway: 10.0.0.1IP Address:10,0.0.2/24Gateway: 10,0.0.1 IP Address;10.0.0.3/2410.0.0.1/24vrrp只定义了一种报文—- vrrp报文,这是一种组播报文,由主三层交换机定时发出来通告他的存在。
使用这些报文可以检测虚拟三层交换机各种参数,还可以用于主三层交换机的选举。
VRRP中定义了三种状态模型,初始状态Initialize,活动状态Master 和备份状态Backup,其中只有活动状态的交换机可以为到虚拟IP地址的的转发请求提供服务。
Session Initiation Protocol (SIP):SIP服务器定位本文档状态本文档为Internet 团体定义了一个Internet standards track协议。
并且请求对这个文档进行讨论以便改进。
请参阅当前版本的”InternetOfficalProtocol Stands”(STD1)来确认本文档的标准化状态以及本协议的状态。
对本文档的发布是没有限制的。
版本信息Copyright (C)The Internet Society(2002). All Rights Reserved.概述SIP协议使用了DNS步骤来使得客户端能够把一个标准的SIP格式的资源(SIP URI)解析成为IP地址,端口,以及使用的协议。
同样SIP也支持服务端在客户端的主机失效的情况下使用DNS来向备份的客户端发送应答。
本文档描述了这些DNS的详细过程。
1.介绍SIP(RFC3261)是一个客户端/服务端的协议,它用来创建用户之间的通讯会话和管理用户之间的通讯会话的。
SIP 的终端系统叫做UA(用户代理),中间的结点叫做proxy 服务器。
一个典型的SIP配置,叫做一个SIP”梯形”,就像在图1中表示的一样。
在这个图中,呼叫方在domain A(UA1),希望呼叫在domain B的用户Joe(Joe@b)。
为了完成这个呼叫,他首先和在自己域内部的proxy1(domain A中的proxy 1)。
Proxy1向被叫方域的proxy 服务器(proxy2)转发这个请求。
Proxy2转发这个请求到被叫方,UA2。
作为呼叫流的一部分,proxy1需要确定domain B的SIP服务器。
为了能够确定这个,proxy1 使用DNS的步骤,使用SRV[2]和NAPTR[3]记录来确定这个地址。
本文档描述了SIP使用DNS的相关问题,并且提供了解决方法。
2.DNS需要解决的相关问题为了能够解决上边介绍的一般呼叫流所需要确定的呼叫双方两方面的问题,我们需要使用DNS。
Network Working Group J. Lyon Request for Comments: 2371 Microsoft Category: Standards Track K. Evans J. Klein Tandem Computers July 1998 Transaction Internet ProtocolVersion 3.0Status of this MemoThis document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions forimprovements. Please refer to the current edition of the "InternetOfficial Protocol Standards" (STD 1) for the standardization stateand status of this protocol. Distribution of this memo is unlimited. Copyright NoticeCopyright (C) The Internet Society (1998). All Rights Reserved. AbstractIn many applications where different nodes cooperate on some work,there is a need to guarantee that the work happens atomically. Thatis, each node must reach the same conclusion as to whether the workis to be completed, even in the face of failures. This documentproposes a simple, easily-implemented protocol for achieving thisend.Table of Contents1. Introduction 22. Example Usage 33. Transactions 44. Connections 45. Transaction Identifiers 56. Pushing vs. Pulling Transactions 57. TIP Transaction Manager Identification & Connection Establishment 68. TIP Uniform Resource Locators 89. States of a Connection 1010. Protocol Versioning 1211. Commands and Responses 1212. Command Pipelining 1313. TIP Commands 1314. Error Handling 20 Lyon, et. al. Standards Track [Page 1]15. Connection Failure and Recovery 2016. Security Considerations 2217. References 2518. Authors’ Addresses 2619. Comments 26 Appendix A. The TIP Multiplexing Protocol Version 2.0. 27 Fully Copyright Statement 311. IntroductionThe standard method for achieving atomic commitment is the two-phase commit protocol; see [1] for an introduction to atomic commitment and two-phase commit protocols.Numerous two-phase commit protocols have been implemented over theyears. However, none of them has become widely used in the Internet, due mainly to their complexity. Most of that complexity comes fromthe fact that the two-phase commit protocol is bundled together with a specific program-to-program communication protocol, and thatprotocol lives on top of a very large infrastructure.This memo proposes a very simple two-phase commit protocol. Itachieves its simplicity by specifying only how different nodes agree on the outcome of a transaction; it allows (even requires) that thesubject matter on which the nodes are agreeing be communicated viaother protocols. By doing so, we avoid all of the issues related toapplication communication semantics and data representation (to name just a few). Independent of the application communication protocol a transaction manager may use the Transport Layer Security protocol [3] to authenticate other transaction managers and encrypt messages.It is envisioned that this protocol will be used mainly for atransaction manager on one Internet node to communicate with atransaction manager on another node. While it is possible to use this protocol for application programs and/or resource managers to speakto transaction managers, this communication is usually intra-node,and most transaction managers already have more-than-adequateinterfaces for the task.While we do not expect this protocol to replace existing ones, we do expect that it will be relatively easy for many existingheterogeneous transaction managers to implement this protocol forcommunication with each other.Further supplemental information regarding the TIP protocol can befound in [5].Lyon, et. al. Standards Track [Page 2]2. Example UsageToday the electronic shopping basket is a common metaphor at manyelectronic store-fronts. Customers browse through an electroniccatalog, select goods and place them into an electronic shoppingbasket. HTTP servers [2] provide various means ranging from URLencoding to context cookies to keep track of client context (e.g.the shopping basket of a customer) and resume it on subsequentcustomer requests.Once a customer has finished shopping they may decide to commit their selection and place the associated orders. Most orders may have norelationship with each other except being executed as part of thesame shopping transaction; others may be dependent on each other (for example, if made as part of a special offering). Irrespective ofthese details a customer will expect that all orders have beensuccessfully placed upon receipt of a positive acknowledgment.Today’s electronic store-fronts must implement their own specialprotocols to coordinate such placement of all orders. Thisprogramming is especially complex when orders are placed throughmultiple electronic store-fronts. This complexity limits thepotential utility of internet applications, and constrains growth.The protocol described in this document intends to provide a standard for Internet servers to achieve agreement on a unit of shared work(e.g. placement of orders in an electronic shopping basket). Theserver (e.g. a CGI program) placing the orders may want to start atransaction calling its local transaction manager, and ask otherservers participating in the work to join the transaction. Theserver placing the orders passes a reference to the transaction asuser data on HTTP requests to the other servers. The other serverscall their transaction managers to start a local transaction and ask them to join the remote transaction using the protocol defined inthis document. Once all orders have been placed, execution of thetwo-phase-commit protocol is delegated to the involved transactionmanagers. If the transaction commits, all orders have beensuccessfully placed and the customer gets a positive acknowledgment. If the transaction aborts no orders will be placed and the customerwill be informed of the problem.Transaction support greatly simplifies programming of theseapplications as exception handling and failure recovery are delegated to a special component. End users are also not left having to dealwith the consequences of only partial success. While this exampleshows how the protocol can be used by HTTP servers, applications may use the protocol when accessing a remote database (e.g. via ODBC), or invoking remote services using other already existing protocols (e.g. Lyon, et. al. Standards Track [Page 3]RPC). The protocol makes it easy for applications in a heterogeneous network to participate in the same transaction, even if usingdifferent communication protocols.3. Transactions"Transaction" is the term given to the programming model wherebycomputational work performed has atomic semantics. That is, eitherall work completes successfully and changes are made permanent (thetransaction commits), or if any work is unsuccessful, changes areundone (the transaction aborts). The work comprising a transaction(unit of work), is defined by the application.4. ConnectionsThe Transaction Internet Protocol (TIP) requires a reliable orderedstream transport with low connection setup costs. In an Internet (IP) environment, TIP operates over TCP, optionally using TLS to provide a secured and authenticated connection, and optionally using a protocol to multiplex light-weight connections over the same TCP or TLSconnection.Transaction managers that share transactions establish a TCP (andoptionally a TLS) connection. The protocol uses a differentconnection for each simultaneous transaction shared betwween twotransaction managers. After a transaction has ended, the connectioncan be reused for a different transaction.Optionally, instead of associating a TCP or TLS connection with only a single transaction, two transaction managers may agree on aprotocol to multiplex light-weight connections over the same TCP orTLS connection, and associate each simultaneous transaction with aseparate light-weight connection. Using light-weight connectionsreduces latency and resource consumption associated with executingsimultaneous transactions. Similar techniques as described here arewidely used by existing transaction processing systems. See Appendix A for an example of one such protocol.Note that although the TIP protocol itself is described only in terms of TCP and TLS, there is nothing to preclude the use of TIP withother transport protocols. However, it is up to the implementor toensure the chosen transport provides equivalent semantics to TCP, and to map the TIP protocol appropriately.Lyon, et. al. Standards Track [Page 4]In this document the terms "connection" or "TCP connection" can refer to a TIP TCP connection, a TIP TLS connection, or a TIP multiplexing connection (over either TCP or TLS). It makes no difference which,the behavior is the same in each case. Where there are differences in behavior between the connection types, these are stated explicitly. 5. Transaction IdentifiersUnfortunately, there is no single globally-accepted standard for the format of a transaction identifier; there are various standard andproprietary formats. Allowed formats for a TIP transactionidentifier are described below in the section "TIP Uniform ResourceLocators". A transaction manager may map its internal transactionidentifiers into this TIP format in any manner it sees fit.Furthermore, each party in a superior/subordinate relationship getsto assign its own identifier to the transaction; these identifiersare exchanged when the relationship is first established. Thus, atransaction manager gets to use its own format of transactionidentifier internally, but it must remember a foreign transactionidentifier for each superior/subordinate relationship in which it is involved.6. Pushing vs. Pulling TransactionsSuppose that some program on node "A" has created a transaction, and wants some program on node "B" to do some work as part of thetransaction. There are two classical ways that he does this,referred to as the "push" model and the "pull" model.In the "push" model, the program on A first asks his transactionmanager to export the transaction to node B. A’s transaction manager sends a message to B’s TM asking it to instantiate the transaction as a subordinate of A, and return its name for the transaction. Theprogram on A then sends a message to its counterpart on B on theorder of "Do some work, and make it part of the transaction that your transaction manager already knows of by the name ...". Because A’sTM knows that it sent the transaction to B’s TM, A’s TM knows toinvolve B’s TM in the two-phase commit process.In the "pull" model, the program on A merely sends a message to B on the order of "Do some work, and make it part of the transaction that my TM knows by the name ...". The program on B asks its TM to enlist in the transaction. At that time, B’s TM will "pull" the transaction over from A. As a result of this pull, A’s TM knows to involve B’sTM in the two-phase commit process.The protocol described here supports both the "push" and "pull"models.Lyon, et. al. Standards Track [Page 5]7. TIP Transaction Manager Identification and Connection EstablishmentIn order for TIP transaction managers to connect they must be able to identify and locate each other. The information necessary to do this is described by the TIP transaction manager address.[This specification does not prescribe how TIP transaction managersinitially obtain the transaction manager address (which will probably be via some implementation-specific configuration mechanism).]TIP transaction manager addresses take the form:<hostport><path>The <hostport> component comprises:<host>[:<port>]where <host> is either a <dns name> or an <ip address>; and <port> is a decimal number specifying the port at which the transaction manager (or proxy) is listening for requests to establish TIP connections. If the port number is omitted, the standard TIP port number (3372) isused.A <dns name> is a standard name, acceptable to the domain nameservice. It must be sufficiently qualified to be useful to thereceiver of the command.An <ip address> is an IP address, in the usual form: four decimalnumbers separated by period characters.The <hostport> component defines the scope (locale) of the <path>component.The <path> component of the transaction manager address contains data identifying the specific TIP transaction manager, at the locationdefined by <hostport>.The <path> component takes the form:"/" [path_segments]path_segments = segment *( "/" segment )segment = *pchar *( ";" param )param = *pcharpchar = unreserved | escaped | ":" | "@" | "&" | "=" | "+"unreserved = ASCII character octets with values in the rangeLyon, et. al. Standards Track [Page 6](inclusive): 48-57, 65-90, 97-122 | "$" | "-" | "_" | "." | "!" | "˜" | "*" | "’" | "(" | ")" | ","escaped = "%" hex hexhex = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" |"A" | "B" | "C" | "D" | "E" | "F" | "a" | "b" | "c" | "d" |"e" | "f"The <path> component may consist of a sequence of path segmentsseparated by a single slash "/" character. Within a path segment, the characters "/", ";", "=", and "?" are reserved. Each path segment may include a sequence of parameters, indicated by the semicolon ";"character. The parameters are not significant to the parsing ofrelative references.[It is intended that the form of the transaction manager addressfollow the proposed scheme for Uniform Resource Identifiers (URI)[8].]The TIP transaction manager address therefore provides to theconnection initiator (the primary) the endpoint identifier to be used for the TCP connection (<hostport>), and to the connection receiver(the secondary) the path to be used to locate the specific TIPtransaction manager (<path>). This is all the information requiredfor the connection between the primary and secondary TIP transaction managers to be established.After a connection has been established, the primary party issues an IDENTIFY command. This command includes as parameters two transaction manager addresses: the primary transaction manager address, and thesecondary transaction manager address.The primary transaction manager address identifies the TIPtransaction manager that initiated the connection. This informationis required in certain cases after connection failures, when one ofthe parties of the connection must re-establish a new connection tothe other party in order to complete the two-phase-commit protocol.If the primary party needs to re-establish the connection, the job is easy: a connection is established in the same way as was the original connection. However, if the secondary party needs to re-establish the connection, it must be known how to contact the initiator of theoriginal connection. This information is supplied to the secondaryvia the primary transaction manager address on the IDENTIFY command. If a primary transaction manager address is not supplied, the primary party must not perform any action which would require a connection to be re-established (e.g. to perform recovery actions).Lyon, et. al. Standards Track [Page 7]The secondary transaction manager address identifies the receivingTIP transaction manager. In the case of TIP communication viaintermediate proxy servers, this URL may be used by the proxy servers to correctly identify and connect to the required TIP transactionmanager.8. TIP Uniform Resource LocatorsTransactions and transaction managers are resources associated withthe TIP protocol. Transaction managers and transactions are locatedusing the transaction manager address scheme. Once a connection hasbeen established, TIP commands may be sent to operate on transactions associated with the respective transaction managers.Applications which want to pull a transaction from a remote node must supply a reference to the remote transaction which allows the localtransaction manager (i.e. the transaction manager pulling thetransaction) to connect to the remote transaction manager andidentify the particular transaction. Applications which want to push a transaction to a remote node must supply a reference to the remote transaction manager (i.e. the transaction manager to which thetransaction is to be pushed), which allows the local transactionmanager to locate the remote transaction manager. The TIP protocoldefines a URL scheme [4] which allows applications and transactionmanagers to exchange references to transaction managers andtransactions.A TIP URL takes the form:tip://<transaction manager address>?<transaction string>where <transaction manager address> identifies the TIP transactionmanager (as defined in Section 7 above); and <transaction string>specifies a transaction identifier, which may take one of two forms(standard or non-standard):i. "urn:" <NID> ":" <NSS>A standard transaction identifier, conforming to the proposedInternet Standard for Uniform Resource Names (URNs), as specifiedby RFC2141; where <NID> is the Namespace Identifier, and <NSS> isthe Namespace Specific String. The Namespace ID determines thesyntactic interpretation of the Namespace Specific String. TheNamespace Specific String is a sequence of characters representing a transaction identifier (as defined by <NID>). The rules for thecontents of these fields are specified by [6] (valid characters,encoding, etc.).Lyon, et. al. Standards Track [Page 8]This format of <transaction string> may be used to express globaltransaction identifiers in terms of standard representations.Examples for <NID> might be <iso> or <xopen>. e.g.tip://123.123.123.123/?urn:xopen:xidNote that Namespace Ids require registration. See [7] for detailson how to do this.ii. <transaction identifier>A sequence of printable ASCII characters (octets with values in the range 32 through 126 inclusive (excluding ":") representing atransaction identifier. In this non-standard case, it is thecombination of <transaction manager address> and <transactionidentifier> which ensures global uniqueness. e.g.tip://123.123.123.123/?transid1To create a non-standard TIP URL from a transaction identifier,first replace any reserved characters in the transaction identifier with their equivalent escape sequences, then insert the appropriate transaction manager address. If the transaction identifier is onethat you created, insert your own transaction manager address. Ifthe transaction identifier is one that you received on a TIPconnection that you initiated, use the secondary transactionmanager address that was sent in the IDENTIFY command. If thetransaction identifier is one that you received on a TIP connection that you did not initiate, use the primary transaction manageraddress that was received in the IDENTIFY command.TIP URLs must be guaranteed globally unique for all time. Thisuniqueness constraint ensures TIP URLs are never duplicated, thereby preventing possible non-deterministic behaviour. How uniqueness isachieved is implementation specific. For example, the UniversallyUnique Identifier (UUID, also known as a Globally Unique Identifier, or GUID (see [9])) could be used as part of the <transaction string>. Note also that some standard transaction identifiers may define their own rules for ensuring global uniqueness (e.g. OSI CCR atomic action identifiers).Except as otherwise described above, the TIP URL scheme follows therules for reserved characters as defined in [4], and uses escapesequences as defined in [4] Section 5.Note that the TIP protocol itself does not use the TIP URL scheme (it does use the transaction manager address scheme). The TIP URL scheme is proposed as a standard way to pass transaction identification Lyon, et. al. Standards Track [Page 9]information through other protocols. e.g. between cooperatingapplication processes. The TIP URL may then be used to communicate to the local transaction manager the information necessary to associate the application with a particular TIP transaction. e.g. to PULL thetransaction from a remote transaction manager. It is anticipated that each TIP implementation will provide some set of APIs for thispurpose ([5] includes examples of such APIs).9. States of a ConnectionAt any instant, only one party on a connection is allowed to sendcommands, while the other party is only allowed to respond tocommands that he receives. Throughout this document, the party thatis allowed to send commands is called "primary"; the other party iscalled "secondary". Initially, the party that initiated theconnection is primary; however, a few commands cause the roles toswitch. A connection returns to its original polarity whenever theIdle state is reached.When multiplexing is being used, these rules apply independently toeach "virtual" connection, regardless of the polarity of theunderlying connection (which will be in the Multiplexing state).Note that commands may be sent "out of band" by the secondary via the use of pipelining. This does not affect the polarity of theconnection (i.e. the roles of primary and secondary do not switch).See section 12 for details.In the normal case, TIP connections should only be closed by theprimary, when in Initial state. It is generally undesirable for aconnection to be closed by the secondary, although this may benecessary in certain error cases.At any instant, a connection is in one of the following states. From the point of view of the secondary party, the state changes when hesends a reply; from the point of view of the primary party, the state changes when he receives a reply.Initial: The initial connection starts out in the Initial state.Upon entry into this state, the party that initiated the connection becomes primary, and the other party becomes secondary. There is no transaction associated with the connection in this state. From this state, the primary can send an IDENTIFY or a TLS command.Idle: In this state, the primary and the secondary have agreed on aprotocol version, and the primary supplied an identifier to thesecondary party to reconnect after a failure. There is notransaction associated with the connection in this state. Upon Lyon, et. al. Standards Track [Page 10]entry to this state, the party that initiated the connectionbecomes primary, and the other party becomes secondary. From thisstate, the primary can send any of the following commands: BEGIN,MULTIPLEX, PUSH, PULL, QUERY and RECONNECT.Begun: In this state, a connection is associated with an activetransaction, which can only be completed by a one-phase protocol.A BEGUN response to a BEGIN command places a connection into thisstate. Failure of a connection in Begun state implies that thetransaction will be aborted. From this state, the primary can send an ABORT, or COMMIT command.Enlisted: In this state, the connection is associated with an active transaction, which can be completed by a one-phase or, two-phaseprotocol. A PUSHED response to a PUSH command, or a PULLED response to a PULL command, places the connection into this state. Failureof the connection in Enlisted state implies that the transactionwill be aborted. From this state, the primary can send an ABORT,COMMIT, or PREPARE command.Prepared: In this state, a connection is associated with atransaction that has been prepared. A PREPARED response to aPREPARE command, or a RECONNECTED response to a RECONNECT commandplaces a connection into this state. Unlike other states, failure of a connection in this state does not cause the transaction toautomatically abort. From this state, the primary can send anABORT, or COMMIT command.Multiplexing: In this state, the connection is being used by amultiplexing protocol, which provides its own set of connections.In this state, no TIP commands are possible on the connection. (Of course, TIP commands are possible on the connections supplied bythe multiplexing protocol.) The connection can never leave thisstate.Tls: In this state, the connection is being used by the TLSprotocol, which provides its own secured connection. In this state, no TIP commands are possible on the connection. (Of course, TIPcommands are possible on the connection supplied by the TLSprotocol.) The connection can never leave this state.Error: In this state, a protocol error has occurred, and theconnection is no longer useful. The connection can never leave this state.Lyon, et. al. Standards Track [Page 11]10. Protocol VersioningThis document describes version 3 of the protocol. In order toaccommodate future versions, the primary party sends a messageindicating the lowest and the highest version number it understands. The secondary responds with the highest version number itunderstands.After such an exchange, communication can occur using the smaller of the highest version numbers (i.e., the highest version number thatboth understand). This exchange is mandatory and occurs using theIDENTIFY command (and IDENTIFIED response).If the highest version supported by one party is considered obsolete and no longer supported by the other party, no useful communicationcan occur. In this case, the newer party should merely drop theconnection.11. Commands and ResponsesAll commands and responses consist of one line of ASCII text, usingonly octets with values in the range 32 through 126 inclusive,followed by either a CR (an octet with value 13) or an LR (an octetwith value 10). Each line can be split up into one or more "words", where successive words are separated by one or more space octets(value 32).Arbitrary numbers of spaces at the beginning and/or end of each line are allowed, and ignored.Lines that are empty, or consist entirely of spaces are ignored.(One implication of this is that you can terminate lines with both a CR and an LF if desired; the LF will be treated as terminating anempty line, and ignored.)In all cases, the first word of each line indicates the type ofcommand or response; all defined commands and responses consist ofupper-case letters only.For some commands and responses, subsequent words convey parametersfor the command or response; each command and response takes a fixed number of parameters.All words on a command or response line after (and including) thefirst undefined word are totally ignored. These can be used to passhuman-readable information for debugging or other purposes.Lyon, et. al. Standards Track [Page 12]。