RSS is a type of web feed which allows interested users to receive updates about their preferred web-based content within a very short time after it is updated.RSS Feed Reader aggregates multiple RSS feeds to display them in a single place. RSS Feed aggregator is the perfect project to demonstrate the power of multithreading. It is a means to show the famous problem of producer-consumer. There are multiple RSS Feed available on the web. To display the content of various sites in one place we need to -
- Request for that web page
- Wait till we receive a response of the feed
- Parse the elements of the feed
- Aggregate the result of various sources
Performing these 4 tasks in a sequential manner is a time consuming process and doesn’t utilize the computing power we have.If we delegated the tasks to multiple processors to do these process in a concurrent manner we will achieve faster retrieval of information.
In this project, we used various techniques to delegate tasks for concurrent execution. The techniques we implemented are as follows -
- Blocking queues
- Thread Pools
- Direct Mapping to Threads
- Sequential execution (to display the efficiency of concurrent techniques by comparison)
Maven installation instructions
mvn install
mvn compile
mvn spring-boot:run
Execute:
mvn pacakage
Then:
java -jar .\target\rss-aggregator-0.0.1-SNAPSHOT.jar
The angular application resides in webui
directory
Navigate to it using: cd ./webui
npm install
ng serve --open