The jRCS design builds on top of TCP/IP and XML standards for low-level communications, thus enabling multiplatform portability of the communication layer itself. XML is a technology enabling interoperability between multiple platforms and languages and is the basic communication language of web-enabled self-describing databases. Furthermore, XML standard supports Unicode character sets, which, coupled with multi-locale support in jBASE 4.1 and 5.2 enable NLS in the remote server architecture.
This allows the possibility of a communication protocol based on XML, which will be available for use in many languages, such as Perl, without the need to provide client libraries. Client libraries will still be provided for C++ and ActiveX clients, but other languages and environments can implement client communication layers utilizing their native or add-on XML support.
jRCS Remote Server
jBASE Remote Server is the central component of the remote connectivity architecture. It is a program executing as a UNIX daemon, or as a service on Windows NT-based hosts. The server interfaces with jBASE via the jBC library, the component used by native jBASE executables to run jBC programs. Due to the fact that jBC code is pre-compiled into C/C++ by the jBC compiler, the jBC library is a C-based interface and results in very low overhead.
jBASE Remote Server consists of a listener process (reactor), which listens for new client connections, and server proxy processes responsible for servicing client requests. The listener process is also responsible for cleanup of dead connections and client sessions which have timed out. All communication is handled via a TCP/IP and XML layer, and proxy processes are spawned dynamically upon client connection.
jRCS Remote Client
jRCS Client is a TCP/IP client capable of connecting to jBASE Remote Server and delegating client application‟s calls to the server. The client is designed as several libraries including the C++ layer, the ActiveX portability layer as well as java and .NET implementations. All TCP/XML calling specifics are fully wrapped by the C++ layer and are not exposed to the client application.
The jBASE C++ Client Library is responsible for connecting to the host computer (jRCS Remote Server) using TCP/IP. Once a connection is obtained, the client allocates C++ proxies for objects on the server to simplify calling remote jBASE services from C++. This layer of jBASE Client is made portable on all supported platforms, so C++ programs can uniformly log on and manipulate data on the remote jBASE server. The client will always locate the Remote Server by using the TCP/IP address and port of the target system supplied by the caller of the library.
In addition to providing connectivity services, jBASE C++ Client Library exposes a dynamic array object, suitable for the manipulation of multi-valued data on the client. The dynamic array object is optimized for speed and is also made portable across platforms.
The ActiveX portability library exposes a set of ActiveX objects on Windows-based systems. The objects constitute proxies for classes exposed by the C++ Client Library, making them accessible from ActiveX containers, such as Visual Basic.
Concurrency and Multiprocessing
jRCS Remote Server is built as a concurrent server and spawns proxy processes to perform tasks on clients' behalf. One process is spawned per connection in a fashion similar to telnetd and sshd servers.
The client libraries are built at different levels of concurrency. However, the C++ layer is internally thread-safe and can be used in multithreaded client applications. Requests for service from client threads are internally serialized by the C++ library on a first-come, first-served basis. This approach ensures that a single connection can be used by multiple client threads maintaining mutual exclusion. ActiveX layers on top of C++ library support apartment threading, which is the only multithreading model realistically defined for COM/ActiveX.
Due to the fact that jBASE runs on a variety of platforms, the server is also portable to various operating systems and compilers. In its choice of supporting technologies the customer will ensure that libraries used by the server are available on all supported platforms.
On the client the only layer which can reliably be made portable is the C++ layer. It uses standard socket library calls together with a multiplatform XML library.
Internationalisation and Unicode Support
As of release 4, jBASE introduces full universal character set support. The remote connectivity library specified in this document therefore uses Unicode for all strings passed between the server and the client and encodes dynamic arrays as Unicode-format UTF16-encoded strings. Information about client‟s locale will be provided to the server at logon time. As was already mentioned earlier in this document, XML fully supports Unicode, so no additional character set support is required by the communication layer.
The following table lists the deliverables for the jBASE Remote Connectivity Library on UNIX and Windows platforms. Please note that some files, such as the ActiveX wrappers and .NET clients, are only available on Windows platforms. Additional libraries may be required as product dependencies, and will be included in the target distributions.