Commit e8b57671 authored by areej.mohammad's avatar areej.mohammad

Update README.md

parent cd054755
# Producer_Consumer
# Producer_Consume
Producer/Consumer Word Stemming Project
This project implements a concurrent Producer/Consumer model in Java for processing large
text files. Its primary goal is to accelerate the Word Stemming process by distributing the
workload across multiple threads and efficiently separating I/O operations from in-memory
processing.
🌟 Key Features
Concurrent Processing:
Uses multiple worker threads (Consumers) to distribute the
stemming workload and achieve high throughput.
Producer/Consumer Pattern:
Organizes data flow across two synchronized queues
(BlockingQueue) to prevent race conditions and manage flow control.
Decoupled I/O:
Separates slow file reading/writing (I/O) from fast, in-memory processing
(Stemming).
Target Output:
Extracts and collects a final list of unique stems found in the input file.
⚙️ Project Architecture
The system is divided into three main stages connected via two blocking queues.
Stemming
Class Role Input Output
Stemming (Main) Setup N/A Starts the threads
and Initialization
Producer File Reader Text File (Lines) Queue 1 (BlockingQueue<String>)
MultipleConsumers Concurrent Stemming Queue 1 (Lines) Queue 2 (BlockingQueue<List<String>>)
SingleConsumerWrite Collector Queue 2 (Lists of Stems) Final Output File (output.txt)
and Writer
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment