3 ms·
It's fairly simple to write a little server that accepts socket connections from multiple processes, and reads a line of data from each connection whenever ther
by DougWebb 10y ago
It's fairly simple to write a little server that accepts socket connections from multiple processes, and reads a line of data from each connection whenever there is data available and append it to the log file. I wrote a server like that years ago; a write-only socket service which hundreds of separate processes could write high-volume statistics-tracking to. The heart of it was only a few dozen lines.
- ww520 10y agoSomething like syslogd?
- DougWebb 10y agoSimilar, but different requirements. All of the messages were grouped by sending process, and when the sending process said its session was over its messages were fed into a post-processing queue. There was support for holding messages in memory or on disk, and data-preserving fallbacks if the post-processing halted or got too backed up. The message rate varied quite a bit; during the US business day the rate was at least doubled. We used that to give the post-processing queue time to catch up off-hours. This was designed about 16 years ago, so well before the big-data tools, ssds, or powerful machines we have today.