The Circus server is now alive. The best proof is that it can be stopped! Ain't that magic?
So what happened since the last billet?
The server learned to stop. This very first message is important: it means that the server actually listens and is able to understand queries.
Stopping the server is not a light operation, most of all because the server is meant to be controlled by the OS (SysV, whatever). Eventually that operation will become privileged. But for now it fills its role.
The server also learned to answer. The second message, ping, sends a phrase that must be sent back.
While implementing that message, a lot of bugs were shaken out; now the ZMQ layer (channel) looks quite solid and working very well with libuv. I am quite sure of that, because the logger also uses libuv, and log messages are correctly emitted.
The server tests also got better. A small test client already got factorized and will be the basis for the following message tests.
Program for next week
I want to look at that multi-user stuff.
The basic thinking is: I would not want anybody just connecting and creating a user, now would I? So creating a user must be a privileged operation, performed by an authenticated and authorized… user…
There are a few possibilities: using PAM, or having an administrator as seed. Maybe pre-creating and filling the database.
Some thinking must happen here.