Resource Analytica: Finding real-time trends analysis in RAP

Reading Time: 2 minutes

With our great tool RAP, we were able to book and manage resources in Knoldus Noida but the problem was we were not able to monitor it.

There was no extension to analyze like:

  • Which asset is everyone’s favorite
  • Who is booking the most
  • Who is booking which asset the most
  • Total hours of the asset being used

With our solution/extension we can provide greater detail to analyze which we were not able to do with the existing product. Also, we don’t need to touch the existing part of the product but our extension is just a plugin to the existing system and we can ship the entire product with extension or without extension depending on the need of the customer.

Architecture

We will build a Kafka CDC pipeline which fetches the data from the database, transform the data and ingest the data into the ElasticSearch.

Then our application which is using:

  • Scala
  • Akka-HTTP
  • Elastic4s

Will interact with the Elastic Search and perform the aggregation and leverage the power of Akka HTTP and Elastic Search to find the result efficiently.

Why Kafka?

We are using Kafka CDC which is the Change Data Capture pipeline because Kafka provides a greater number of tools and features to develop such kind of pipelines. With Kafka Connect we will be able to move data from RDBMS to Kafka in real-time and then our Kafka Stream Application will transform the data and ingest data into elastic search as per our requirement.

Comparing RDBMS and ElasticSearch, ElasticSearch out-performed RDBMS if done right. 

Features

  • Top 3 most booked assets
  • Top 3 employees booking the asset with their favorite asset.
  • Total hours of all asset booked
  • Total hours of individual asset booked
  • Most booked asset
  • Least booked asset
  • Asset wise Information
    • Frequency of booking day of the week wise
    • Total hours Booked
    • Who booked the most
  • Customized Date range data
    • In our REST API, we can provide the date range for all the statistics.
    • This will help to find statistics of the particular date range.

Future Scope

At the moment we are blocking ESClient which we can make it fully asynchronous. Elastic4S client doesn’t provide type-safety everywhere and that is reflecting in our code in ESClient part.

Resources

Written by 

I am from India and developing Scala Microservices :)

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading