The present disclosure relates generally to the prevention of escaped RPC associations which can lead to application data corruption. The mechanism described is used to preserve application session integrity that use multi-association (e.g. multiple TCP connections) RPC based protocols.
In a typical Enterprise deployment, users of an electronic mail application may be accessing a centralized mail server over a wide area network. The users may communicate data traffic between the electronic mail application and the centralized mail server across a plurality of devices, such as routers and switches. The devices may be managed from sources both internal and external to the Enterprise deployment. As a result, current systems may not be able to ensure that all the TCP connections from a given client are always going to go through the same set of computing devices. There is a need for a system which can ensure that all the TCP connections from a given client are always going to go through a set of computing devices as part of their path between client and server. When “TCP connections” are mentioned throughout this application, it should be understood that the term comprises an RPC association in general. A TCP connection is one type of many RPC associations and embodiments of the present invention may be applicable to any type of RPC association (UDP, HTTP, etc.). Under the cases where not all the RPC associations go through the same set of computing devices, the escaped associations can cause data corruption in email data. This invention prevents the possibility of data corruption.
Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily to scale. Emphasis is instead placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like references numerals designate corresponding parts through the several figures.
Escaped connection handling may be provided. In various embodiments, the creation of a new association group may be requested. An acknowledgement message approving the creation of a new association group with a new association group ID (server created association group ID) is sent from the server. This acknowledgment message may be intercepted en route to its destination. The server created association group ID may then be switched by the intercepting device to a transformed association group ID. A DCE/RPC association may then be established between a first computing device and a second computing device wherein acceptance of the connection to the existing association group requires the server created association group ID to be received with the connection at a second computing device and the transformed association group ID to be received with the connection at a first computing device. A plurality of TCP connections may be established between the first computing device and the second computing device. A message may be transmitted across the first TCP connection from the first computing device and the second computing device. The second computing device may determine whether the message contains the server created association group ID and transmit a connection rejection message if it does not.
Consistent with embodiments of the present invention, a system may be provided comprising an application optimizer. The application optimizer may be configured to receive a transmission with a server created association group ID. The server created association group ID of the transmission may then be switched to a transformed association group ID. The transmission may then be sent to the destination with the second association group ID. The application optimizer may then receive a transmission with the second association group ID. The transformed association group ID of the transmission may then be switched to the server created association group ID.
Consistent with embodiments of the present invention, a method may be provided comprising sending a first bind request with an association group ID of zero. A server created association group with a server created association group ID may then be created. The server created association group ID may be switched to a second association group ID in an acknowledgement message. A second bind request may then be sent with the transformed association group ID. The transformed association group ID may be switched to the server created association group ID in the second bind request after the bind request has been sent. After receiving the second bind request, it may be determined whether the association group ID in the second bind request is the same as the server created association group ID. A failure message may be sent if the association group ID in the second bind request is not the same as the server created association group ID.
Turning to
After the establishment of a first Remote Procedure Call (“RPC”) association, client 110 may next create a second RPC association belonging to association group 120. To accomplish this, client 110 may send a bind PDU request 240 with the AGID received during the creation of the first RPC association. Server 170 will add the second RPC association to establish the connection and return a bind acknowledgement 250 with the same AGID.
As such, two associations have been established as belonging to the association group 120. Association group 120 may have any number of connections in it (depending on the load). There is a 1:1 relationship between an RPC association and the underlying TCP connection. For example, the RPC runtime on both client 110 and server 170 has a data structure for each TCP/IP connection. Each connection must belong to exactly one association group 120. Once a connection is tied to an association group 120, a connection may not change the association group that it belongs to. Association group 120 and other association groups may be uniquely identified by the 3-tuple—{Destination IP, Destination Port, Association Group ID}.
In the examples illustrated by
Referring now to
Association group 340 may be established with a first TCP connection 420. For example, client 110 may send a bind( ) PDU with AGID=0 to request creation of association group 340. Server 170 may subsequently create association group 340 and return the AGID=AG1. Client 110 may then create new association belonging to association group 340 with the server created AGID=AG1.
The second TCP connection 410 may subsequently be created belonging to association group 340. However, as illustrated in
As such, TCP connection 420 may bypass Edge MAPI AO 210. Client 110 may send a bind( ) PDU with AGID=AG1. Server 170 may then admit the new connection into association group 340 resulting in a valid RPC transport on an escaped connection. Escaped connections can result in unexpected behavior including connection disconnects, duplicated E-mails, and failures with send and receive operations.
Embodiments of the present invention comprise a client sending a bind( ) PDU with a zero AGID (requesting the creation of a new association group). A server may create an association group and return a bind acknowledgment comprising AGID=AGID1. An optimizer may then switch the AGID in the bind acknowledgement to AGID2. For a second connection, the client may send a bind( ) PDU with a second association group. The optimizer may switch the AGID to AGID1. As a result, the server can admit the new connection to the first association group.
The AGID switching function of this invention can be any F: X→Y in which:
In some embodiments of the present invention, the AGID switching function can be represented as AG2=(0x8000 0000)̂(AG1) or AG2=(0x8000 0000) XOR (AG1). Advantages to this switching function include its simplicity. Furthermore, such a switching function makes it easier to correlate the switched AGID with the original AGID for debugging purposes. Also, this approach may retain the monotonically increasing nature of AGIDs. Lastly, this approach may make it very unlikely for the AGIDs to wrap and cause conflict.
Now, a second TCP connection belonging to the association group may be desired. Client 110 may send bind( ) PDU with AGID=AG2. Edge MAPI AO 210 may intercept the bind( ) and switch the AGID to AGID=AG1. Next, server 170 admits the new connection into AG1. An advantage of embodiments of the present invention is that a user at client 110 or server 170 does not need or have visibility of the AGID changes.
In these embodiments, an attempted “escaped connection” is handled when the bind( ) on the escaped connection reaches server 170. Server 170 will not recognize the provided AGID and the attempt will fail. Server 170 may return a bind_nak( ) message in response. At this point, client 110 may retry with a new connection. If the new attempted connection escapes again, it would result in a repeat of the rejection at server 170 as described above. In some embodiments, client 110 may retry approximately ˜40 times and consistently get bind_nak responses in return before termination.
If the connections keep escaping in this way, the time frame of these retries may be adjusted based on WAN conditions. For example, 40 ms Round Trip Time (“RTT”)—˜3 sec; 200 ms RTT—˜18 s; 400 ms RTT—˜38 s; and LAN conditions—˜1 sec. It should be understood that these retry time frames may be adjusted to any period of time based on user preferences. If the connections keep escaping in this way then after the pre-determined number of retries the client may discard the AGID and creates a new association group.
The above example considers the case where all the new TCP connections escape to the server (to simulate the worst-case scenario). In a practical deployment, the network conditions causing the “escape” may be transient and thus reduce this window of potential escaped connections.
In embodiments of the present invention, it may be necessary to have the AGID switch only at Edge MAPI AO 210. The switching logic itself may also be contained within Edge MAPI AO 210. In some embodiments, handed-off connections after the AGID is switched may be entered into a table which tracks the activities of an association group. Such a table may be beneficial to help ensure that Edge MAPI AO 210 switches the AGID for subsequent new connections belonging to the same association group.
Embodiments of escaped connection prevention may be implemented in hardware, software, firmware, or a combination thereof (collectively or individually also referred to herein as logic). To the extent certain embodiments, or portions thereof, are implemented in software or firmware, executable instructions or code for performing one or more tasks of escaped connection prevention are stored in memory or any other suitable computer readable medium and executed by a suitable instruction execution system. In the context of this document, a computer readable medium is an electronic, magnetic, optical, or other physical device or means that can contain or store a computer program for use by or in connection with a computer related system or method.
To the extent certain embodiments, or portions thereof, are implemented in hardware, escaped connection prevention may be implemented with any or a combination of the following technologies: a discrete logic circuit(s) having logic gates for implementing logic functions upon data signals, an application specific integrated circuit (ASIC) having appropriate combinational logic gates, programmable hardware such as a programmable gate array(s) (PGA), a field programmable gate array (FPGA), etc.
With reference to
Network device 600 may have additional features or functionality. For example, network device 600 may also include additional data storage devices (removable and/or non-removable) such as, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in
Network device 600 may also contain a communication connection 616 that may allow device 600 to communicate with other network devices 618, such as over a network in a distributed network environment, for example, an intranet or the Internet. Communication connection 616 is one example of communication media. Communication media may typically be embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and includes any information delivery media. The term “modulated data signal” may describe a signal that has one or more characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media may include wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media. The term computer readable media as used herein may include both storage media and communication media.
As stated above, a number of program modules and data files may be stored in system memory 604, including operating system 605. While executing on processing unit 602, programming modules 606 may perform processes including, for example, one or more method 500's stages as described above. The aforementioned process is an example, and processing unit 602 may perform other processes.
Generally, consistent with embodiments of escaped connection prevention, program modules may include routines, programs, components, data structures, and other types of structures that may perform particular tasks or that may implement particular abstract data types. Moreover, embodiments may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like. Embodiments of escaped connection prevention may also be practiced in distributed network environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed network environment, program modules may be located in both local and remote memory storage devices.
Furthermore, embodiments of escaped connection prevention may be practiced in an electrical circuit comprising discrete electronic elements, packaged or integrated electronic chips containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. Embodiments may also be practiced using other technologies capable of performing logical operations such as, for example, AND, OR, and NOT, including but not limited to mechanical, optical, fluidic, and quantum technologies. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuits or systems.
Embodiments of escaped connection prevention, for example, may be implemented as a computer process (method), a network system, or as an article of manufacture, such as a computer program product or computer readable media. The computer program product may be a computer storage media readable by a computer system and encoding a computer program of instructions for executing a computer process. The computer program product may also be a propagated signal on a carrier readable by a network system and encoding a computer program of instructions for executing a computer process. Accordingly, aspects of escaped connection prevention may be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). In other words, embodiments of escaped connection prevention may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. A computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
The computer-usable or computer-readable medium may be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. More specific computer-readable medium examples (a non-exhaustive list), the computer-readable medium may include the following: an electrical connection having one or more wires, a portable computer diskette, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CD-ROM). Note that the computer-usable or computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
While the specification includes examples, the invention's scope is indicated by the following claims. Furthermore, while the specification has been described in language specific to structural features and/or methodological acts, the claims are not limited to the features or acts described above. Rather, the specific features and acts described above are disclosed as example for embodiments of escaped connection prevention.