Build a taxonomy service – Should consume text and increment the most commonly used words and their frequency. It should be developed in two parts: • one approach using in memory cache with thread safety constructure • second approach to store the words and frequency in the database
There should be two rest apis :
- Consume text to be parsed for taxonomy.
- Api to give list of words and frequency Focus on performance, efficient use of data structures and thread safety!
- Download the repository and open it as a Gradle-Groovy project
- Run a standard bootRun
- Head over POSTMAN
- Set the command to POST and past the following link :http://localhost:8080/parse. In the body, paste the desired text.
- Click SEND
- Set the command now to GET and the paste the following link :http://localhost:8080/frequency.
- The result shown will be the individual words and their frequencies.
-
As the scope of the project indicates, this code at present doesn't access either a Databse or a Cache. Data should be accessed from the cache and the database and the respective updates of the words and their frequencies should be made as such without using a hashmap
-
The following code is not Thread Safe, doesn't focus much on performace and uses an inefficient data structure.