This project aims to build a simple Go-based HTTP server that counts the frequency of a given word in the downloaded text file from Gutenberg project.
This server is built as a part of the Load Testing Utility, which is used to test the performance of this server in terms of Latency and Throughput w.r.t the number of server threads used to process the frequency count requests.
- The server is implemented using Go's Networking API (no framework is used).
- It listens for HTTP GET requests and processes them to return the frequency of a specified word in
resources/war_and_peace.txt
.
- The server is implemented using
numServerThreads
goroutines to process the requests concurrently - as an input given by the Load Testing Utility for server threads. - The server waits for all the goroutines to finish their execution and then, returns the frequency of the word in the text file.
- The server implements the Producer-Consumer design pattern with a channel to handle the tasks.
- Basic throttling is implemented to check for and avoid channel overflow, maintaining a high throughput.
- This design is used to achieve the Load Testing Utility's requirement to test the server's performance.
- Ensure that this server is running before starting the load testing utility.
- The server and load testing utility are designed for educational purposes to demonstrate the effects of multithreading on performance.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch:
git checkout -b feature/AmazingFeature
- Commit your Changes:
git commit -m 'Add some AmazingFeature'
- Push to the Branch:
git push origin feature/AmazingFeature
- Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.