Author: Sakshi Gupta

Scala Extractors

Covariance and Contravariance in Scala

Reading Time: 3 minutes Variance is the quality of being different. It is the correlation of subtyping relationships of complex types and subtyping relationships of their component types.Covariance allows assigning an instance to a variable whose type is one of the instance’s generic type; i.e. supertype.Contravariance allows assigning an instance to a variable whose type is one of the instance’s derived type; i.e. subtype. Before learning about variances, prerequisite Continue Reading

Kafka Broker Down, No worries ! Get Alerts!

Reading Time: 5 minutes In the previous post, we have monitored our Kafka matrices using Prometheus and visualize the health of Kafka over Grafana. Now we will set an alert, so whenever any of Kafka broker is down, we’ll receive a notification. For Kafka, a single broker is just a cluster of size one. Usually we don’t create a single broker. If a single broker is down, our Kafka Continue Reading

Monitoring Kafka with Prometheus and Grafana

Reading Time: 3 minutes Kafka monitoring is an operation which is used for the optimization of the Kafka deployment. This process is easy and efficient, by applying one of the existing monitoring solutions instead of building your own. Let’s say, we use Apache Kafka for message transfer and processing and we want to monitor it.But, before learning the steps for monitoring, let’s first understand the prerequisites. Kafka It is Continue Reading

Scala Extractors

Type Parameterization and Type System: Introduction

Reading Time: 3 minutes Scala is a static type language, which means types are checked at compile time instead of runtime. Type System provides safety during the compile time because we are detecting the error beforehand as these can be a potential error at runtime. Type parameterization also called as generics combined with Scala’s type system. We can write generic code so that we can reuse that code. Suppose, Continue Reading

Scala Extractors

Traits, Stackable Modification and Linearization in Scala

Reading Time: 4 minutes TraitA trait is similar to a Java interface, but it provides more than those interfaces. A trait can have methods and field definitions, which can then be reused by mixing them into classes.Let’s start by simply defining a trait.Defining a trait: In Java, there wasn’t a concept of abstract variables. Only methods and classes can be abstract. Scala has abstract variables. Thus, in the above Continue Reading