This is top keyword Analyzer it uses the concepts of mutiple threading in java
- You can use it to find major keywords for a social media platform,database or a file.
- It can be used to find the trending keywords of social media platform once connected to a database.
The basic concept that i have used to develop this tool is that:
- I have first simple taken all the words and saved them in a hashmap with their respective values but here i have applied the concept of multiple threading
- I can add upto a 1lakhs thread and the code won't break as I have made a ThreadManager to implement it.
- Simply add the no of threads you want to manage in it.
- Then simple add the threads with the file path
- You can create threads more than threads you want to run parllely still it will work manage the extra threads.
- It can handle upto 1Lakh threads without breaking the code
ThreadManager threadManager=new ThreadManager(number of threads you want to run parllely);
//the threads you want to add
threadManager.waitTillQueueIsFreeAndAddTask(new TopKeywordAnalyzer("filepath"));
threadManager.waitTillQueueIsFreeAndAddTask(new TopKeywordAnalyzer("filepath"));
threadManager.waitTillQueueIsFreeAndAddTask(new TopKeywordAnalyzer("filepath"));
I will be adding interface so that you can simply add the file paths and number of threads in it rather than hardcoding it.
Happy Coding Folks.