Chapter 23. The RefDB client/server communication protocol

Table of Contents

Basic principles
Message format
First stage
Second stage
Commented abstract representation of the client/server protocol
First stage
Second stage
Status messages
Tools for the client-server protocol
See also

This chapter describes the communication protocol that the RefDB clients and server use to talk to each other. Knowledge of this protocol is useful for programmers who want to write custom RefDB clients. The protocol is versioned in order to allow clients and servers to negotiate whether they can fulfil each other's expectations. The protocol described in this document is version 5.


The RefDB project provides a Perl client module in addition to the C clients shipped with the RefDB package proper. Due to the simplicity of the Perl language, this module is a good resource for programmers who want to implement clients in other programming languages.


Custom clients or client libraries can be implemented in any programming language that can create a Unix socket connection to the server and send/receive byte sequences through the socket. As the transferred data are essentially plain text, the endianness of the computer as well as the internal representation of data types in the particular programming language are irrelevant.