Transmitting Data via FTP

The File Transfer Protocol is one of the oldest and simplest methods for moving data from one machine to another. As a result, several FTP server and client implementations are available for most operating systems and programming languages. The wide availability of FTP software makes it ideal for cross-platform applications.

FTP is a connection-oriented protocol and requires that the two participating systems be capable of establishing a socket connection on port 21. This might not be possible in many cases because of corporate firewall and proxy server restrictions. Even if the FTP server is visible on the public Internet, the FTP client could be restricted in which ports it may connect to.

Unless you are willing to create a customized FTP server implementation, any processing to be performed on incoming data is asynchronous. Also, the transaction is one-way, with no feedback (other than successful receipt of the file) being sent to the client. This makes FTP useful for asynchronous updating of read-only information but unsuitable for transaction-oriented applications. Figure 8.2 shows a typical FTP messaging configuration between two companies.

Figure 8.2. Client applications post XML message files to a public FTP server.


Compatibility

Most server operating systems provide a basic FTP implementation. Although the FTP server is used to transfer XML messages, from a message processing standpoint, the FTP service itself is irrelevant. A message-processing system built on top of FTP must be prepared to monitor a specific directory for incoming files and then process the files in a timely manner. These files could even arrive by other means, such as through an ordinary file share.

Reliability

FTP has been in use for more than two decades. Thousands of files are transferred via FTP every day. When installed and configured properly, an FTP installation should be almost 100% reliable. The major issue affecting reliability is the quality of network connectivity to the server in general. If a large number of simultaneous connections are expected, or if large volumes of messages will need to be processed, the underlying server must be configured accordingly.

Data Integrity

Ensuring that the file sent is the same as the file received is particularly important. One factor to take under consideration is that the FTP protocol provides two distinct file transfer modes: binary and text. FTP servers default to text transfer mode, which means that carriage returns and linefeeds may be replaced by the server to reflect the predilections of the server OS. For instance, Unix systems use a single linefeed (0x0a character) to terminate a line, while Windows-based systems use a carriage return/linefeed combination (0x0d 0x0a).

For portability between machines, XML documents should be transferred in either UTF-8 or UTF-16. Also, file transfers should be done in binary mode, to prevent the server from arbitrarily modifying the incoming files.

Security

FTP servers provide username and password–type authentication. The actual user verification and file security is usually provided by the underlying operating system. Also, unless FTP over Secure Socket Layer (FTPS) is used, all communication between the client and the server is sent in the clear across the Internet. The level and quality of security and encryption depends on the sensitivity of the data being transferred.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.140.18