************************************* * * * DB/C Newsletter * * October 2001 * * * ************************************* News and Comments DB/C DX 12 is now in beta testing. We will be releasing the second beta test version in early November. If all goes well, DB/C DX 12 will become the production version of DB/C DX in December. We are still looking for beta testers. If you're interested, send me an email. One area of DB/C product installation that is causing quite a bit of confusion and trouble is the TCP/IP communication setup between clients and servers in DB/C FS and in DB/C DX Smart Client. This month's article provides an overview of how this client/server communication works. don.wills@dbcsoftware.com ****************************************************************************** Communications Between Client and Server in DB/C FS and DB/C DX Smart Client Communications between clients and servers in DB/C FS and DB/C DX Smart Client is implemented with TCP/IP. Unfortunately, firewalls, native address translation (NAT), security and other issues complicate the installation and operation of this communication. DB/C FS and DB/C DX Smart Client offer several alternatives that can be used in most situations. There are several types of client software provided with DB/C FS and DB/C DX Smart Client. There are two categories of DB/C FS client software: SQL access and traditional DB/C file I/O access. Two SQL client software options are provided: the Win32 ODBC driver and the Java JDBC driver. Several file I/O access client options are provided: the Java file I/O class library, the C file I/O source code, DB/C DX 10 and later programs running as FS clients, and DB/C JX programs running as FS clients. The DB/C DX Smart Client client software comes as Win32 executables (dbcsc.exe and dbcscc.exe), as UNIX executables (dbcsc), and as a Java library that can be executed as a browser Applet or as a Java application. As you can see, there are lots of options. The server software consists of the daemon (or dispatcher) program and the run program. For DB/C FS, the daemon executable program is dbcfs.exe (Win32) or dbcfs (UNIX). The run program is dbcfsrun.exe (Win32) or dbcfsrun (UNIX). For DB/C DX Smart Client, the daemon executable program is dbcd.exe (Win32) or dbcd (UNIX). The run program is dbcc.exe (Win32) or dbc (UNIX). The FS and Smart Client client software can be run in various places. The client software can run on the same machine as the server, on the same LAN as the server, on a corporate intranet (WAN), or on a computer that connects with the server using the Internet. To complicate matters, the DB/C FS and DB/C DX Smart Client server software may be running on a computer that is secured behind a corporate firewall. The number of permutations of client-to-server connections is large. The connection between the client and server is initiated when the client software makes a TCP/IP connection to the IP address and port number of the server. In DB/C FS 3, this connection may be encrypted (with SSL) or it may be unencrypted. In DB/C FS 3, the default port number for an SSL connection is 9585 and the default port number for an unencrypted connection is 9584. These port numbers may be changed in the server configuration. In both DB/C DX 11 and DB/C DX 12, the default port number for the initial connection to the server is 9735. The initial connection is not encrypted because, unlike DB/C FS, it does not contain any login information. The initial connection can be done from behind firewalls and from NAT IP addresses on the client side as long as the server IP address and port is accessible from the client software. The server IP address and port number may be directly accessible, or they may be handled by a proxy server that forwards the connection to the actual server inside the firewall. After the initial TCP/IP connection is made, the server daemon starts a run program as a separate process. This run program does the work as directed by the client. In DB/C FS 2, the run program was always running, but in DB/C FS 3 and in DB/C DX Smart Client, a new run program process is started with each new connection. After the run program has started, the initial TCP/IP connection between the server daemon and the client software is closed. The actual communication between the client and the run program takes place on a new TCP/IP connection. It is this second connection (we call it the data connection) that causes many setup problems. In DB/C FS 2, the data connection is similar to the initial TCP/IP connection. The client software acts as the TCP/IP client, and the run program acts as the TCP/IP server. In this situation, each server run process has its own port number. By default, these port numbers are ephemeral port numbers (see below). For situations where port numbers must be known ahead of time (preallocated), a configuration option can be used to specify the first number of a range of port numbers. All of these port numbers must be accessible from the client. Thus if a 100 user license of DB/C FS 2 is running, 101 contiguous port numbers need to be allocated. Various problems are caused by this design. Ephemeral port numbers (also known as dynamic or temporary port numbers) are port numbers that are allocated randomly by the operating system - thus they can't be known ahead of time. Many, although not all, corporate security policies and firewall configurations allow connections using ephemeral ports. In DB/C DX 11, we attempted to remedy the problems of DB/C FS 2 by making the data connection be the reverse direction. The use of either ephemeral ports or a predefined range of port numbers is not required because the client software is acting as the TCP/IP server. However, in situations where the client is behind a firewall or NAT boundary (that is, the client doesn't have an IP address that is accessible from the server), this design doesn't work. This same design is used in DB/C FS 3.0. In DB/C DX 12.0 and in DB/C FS 3.1 (both of which will be released before the end of this year), all options are available. The data connection can be either inbound or outbound, and the port numbers can be predefined or ephemeral port numbers. In both FS 3 and in DX 12, a configuration option is used to specify the encryption options that are available for the data connection. The three options are: encrypted connections only, unencrypted connections only, or support for both (in this case the client specifies whether or not to use encryption). In summary, the design of the TCP communications between client and servers in DB/C FS and DB/C DX Smart Client has evolved over the last few years. With the release of DB/C DX 12.0 and DB/C FS 3.1, the options available for TCP/IP configuration can be used to work successfully in almost all situations. ****************************************************************************** DB/C Class Schedule Class: DB/C DX and JX Language Fundamentals Date: January, 2002 Location: Oak Brook, Illinois For information, send email to admin@dbcsoftware.com. ****************************************************************************** Subscribing to the DB/C Newsletter If you don't already have the DB/C Newsletter delivered to your email address and would like to have it emailed to you monthly, just send an email message to 'dbcnews-subscribe@dbcsoftware.com'. The newsletter will be delivered to the email address from which the message was sent.