Closed yceh closed 2 years ago
By the way, an example of client is at src/usher-sampled/driver/client-example.c
Fantastic! Perhaps @AngieHinrichs can give it a try? What happens if the main process fails?
The client will get a connection refused error when making the connect call and then take appropriate actions.
The missing ambiguous mutations on filtered placements fix (https://github.com/yatisht/usher/pull/248) is also ported here.
Thanks @yceh! hgwdev is down at the moment -- when it comes back up later today it will be replaced with a newer machine with even more & faster cores. :) When it's back up I will update & rebuild.
Because usher-sampled is not compatible with usher-common interface, I added executable for usher-sampled-server.
It will create a socket for incoming client connection and a pipe for commands. Help message (run usher-sampled-server without argument) have more details.
A new process will be forked for each incoming connection, and the operating system will duplicate the tree and clean them up in the end. Each process has a default time out of 3 min. There is no cap on the number of processes. (I guess Apache does that? I am not sure)
It can accept connections while reloading trees, but it is highly experimental, because I am not familiar with forking a multi-threading process.
I am playing with sockets for the first time, and don't have much idea about what can go wrong, so some help with testing will be very appreciated.