Sunday, December 20, 2009

I am happy to report that an initial implementation of network client server has been checked in. This will allow the SimpleDBM clients to use a thin client which will connect to a remote SimpleDBM server.

The client interface is a simplified version of the Database API.

The network protocol is based on a simple request/reply model. The messages are passed in the SimpleDBM serialization format.

I looked at the possibility of using a third-party NIO framework for SimpleDBM. However, all existing frameworks seemed to be unnecessarily complicated, due to a desire to make them generic. In the end, I ended up writing my own NIO server. It was easier than I thought it might be; though it is early days and I have not tested all the failure scenarios yet.

There is no attempt to optimise the network traffic in the current implementation. The main goal right now is to prototype the client interface and get it to a satisfactory level. Optimisation can happen once the interface is stable.

The current implementation does not have any security constraints; security must be handled by the client application.

An example of how the client interacts with the server is shown in the snippet below: