We think you might be interested in this job:
This a very basic TCP server, I kept it simple for brevity. The database is a map structure, and I didn’t use concurrency locking for it. Functions — connection, reader, router and handler are modules and I use composition for them.