Chapter 13. Using PPCS in SIMPOL
This chapter will describe in detail the issues surrounding database access in SIMPOL using the Superbase Peer-to-Peer Client/Server (PPCS) approach. By the end of the chapter you should feel reasonably confident in accessing PPCS database tables from SIMPOL.
What is PPCS?
PPCS provides a protocol for accessing database tables and binary files using a variety of communication methods. Currently there is support for direct serial cable connections using RS-232 and also modem-based connectivity. There is also support for NetBIOS and UDP/IP. PPCS is a connectionless protocol. In practical terms, that means that there is no actual maintained connection between the client and the server. Each transaction between the client and the server is complete and independent of any other connection. For example, assume that a UDP connection is made across the Internet and a database table is opened and the client selects a record via an index. Then for some reason the connection to the Internet goes down. After a short while the connection comes back up and the user selects the next record. In such a situation, since no request had been made to the server in the interim, the PPCS client program would not be aware that anything had happened and would successfully receive the next record. This would not be the case with a connected protocol.
As described in the previous paragraph, PPCS allows access to database tables and binary files that have been shared on a PPCS server. The type of access provided is record level access to the database tables in a shared read-write mode. That means that only operations that can work in a shared read-write mode are supported. Records can be created, locked, modified and deleted using this access technology. Not supported is changes to the database structure, such as adding, modifying, or removing fields and indexes or even creating or removing database tables. In SIMPOL this is known as PPCS Type 1. At some stage we will release a PPCS Type 2. This will support the full range of capabilities of the new Superbase Micro Engine database and will also allow for complete remote management of the database backend. The binary file support allows the sharing of binary files for direct transfer via PPCS from the server to the client. The name space within a PPCS Type 1 server is flat, so binary and database files with duplicate names even if from different directories cannot be served on the same server.
In SIMPOL there is currently only support for using PPCS via UDP. Preparation has been made to support serial connections, but the actual capability has not yet been implemented. Also, it is not possible to transfer binary files using PPCS in SIMPOL. By using the TCP/IP sockets a file transfer protocol can easily be created. Sample programs including a client and server program are provided.