A general-purpose server, implemented using multiplexed I/O with epoll and custom thread pools for concurrency on a multicore system.
Table of Contents
Setting up Libraries
Lysten uses either static or shared libraries in order to incorporate the thread pool. These libraries can be set with
Static Library Compilation
Shared Library Compilation
To compile Lysten using the shared thread pool libraries, run:
To compile Lysten using the static thread pool libraries, run:
To compile Lysten with debugging statements on, run:
Note: This compiles using the thread pool's static libraries, so make sure to run
make package-static-lib first.
Included is a test script to pelt the server with multiple clients all at once. You can run this test with:
By default, the test script will spin up 10 clients who each run 10 cycles or commands. This can be changed by running
To run the server, execute:
To start a client, execute:
- C - The C language itself
- Epoll - Multiple epoll units are used to efficiently retrieve tasks from a job queue
- Thread Pool - A custom thread pool is used to disperse tasks across cores
- Pseudo TTYs - Psuedo terminals spin up to run Bash commands remotely
As always, I'm very happy to receive pull requests, questions/issues regarding code, and feature requests.
- Sam Messina - Sole Developer
Lysten is licensed under the MIT License - see the LICENSE.md file for details.