LetoDB on Sourceforge
Download Letodb 2.17 b3:
Windows 32-bit binaries
Debian 7 32-bit binaries
Forum in clipper.borda.ru
LetoDB is a client-server database management system (DBMS), which is a freely available alternative for Advantage Database Server (ADS), a client-server solution, popular among xBase developers.
ADS, established in 1993 by Extended Systems, was later purchased by Sybase, and in 2015 - by SAP. This is a great product - a fast, reliable, easy to use, it works on almost all server operating systems. The special value for Clipper/Harbour lies in the fact that it was originally made to support client RDD (Replaceable Database Driver), which is a part of these programming tools; and thus, it is possible to access the ADS with the same methods as those, which are used for native, local database files. For a serious applications, working in multi-user mode, the file-server version is not acceptable enough, and ADS had no alternative solutions for many years. But, like any DBMS, it is not cheap. That's why and I get the idea to do something like ADS on the basis of open source. In addition to cost savings, it is possible to implement some features that you need - as always when you do something yourself.
I would especially like to remark: LetoDB is a client-server, but not SQL DBMS, it is not NoSQL DBMS, too, because it is based on relational databases, or if strictly adhere to the definition of the relational model, databases with relational approach.
When performing any operation with the database table (opening, closing, moving, data extraction, ...), the client program sends a request to the server; LetoDB server module executes the query and sends a response. All direct operations with database files makes server module. It searhes the needed record, if a search is requested, filters records, provides search and skipping through the index - the client gets the result only. In this way, even for the simplest operation, such as skipping through the index, a significant saving of a network traffic is achieved and a higher performance is provided than with a file-server solution. The contents of the index file does not move through the network at all, the client program "does not see" it, only requested records from the table are sent.
LetoDB supports transactions. When few writes to the database tables are joined in a transaction, all changes are buffered in the client program and are sent to the server in one packet when the end of the transaction is achieved (leto_CommitTransaction() function is called). The server checks that the necessary locks are done, checks the possibility of operations (matching data types and lengths) and if everything is OK, performs all the operations specified in the received packet, and if not - refuse to perform the transaction. Implementation of transactions in LetoDB generally meets ACID rules:- Atomicity is provided, because all operations within a transaction performed by one packet for a single communication session request / response, and because before the immediate implementation of these operations, the server checks whether all the conditions are met - this is guaranteed hassle-free and complete a transaction.
- Consistency in the broad sense of the term - on responsibility of a programmer. If he included in transaction all related operations, it is provided.
- The isolation provided by the fact that before executing the transaction, the thread attaches all required tables, i.e., ensures that parallel running threads will not work with these tables, and checks for locks.
- Durability - if the transaction is made, the client sudden shutdown will not lead to its cancellation.
LetoDB server is written mostly in C and uses some Harbour libraries, including database drivers - DBFCDX and DBFNTX.
The client part includes a Leto Client Engine - the complete set of C functions which implement access to the server, and Leto RDD - the database driver for Harbour. Leto Client Engine provides access to the LetoDB server for programming languages and toolswhich has the ability to link wit C-modules, ie for most modern programming tools.
There is also a PHP - client, or rather, a piece of code, which demonstrate a possibility of such solution.
The LetoDB distribution includes several utilities, including Server management utility server manager, which run on the client workplace and provides a variety of information about the server: statistics, connections list, the list of open tables, and allows you to close any connection - "kill" the client.
(not be shown publicly)