Author: Rishi Khandelwal

Functional Java: Let’s understand the higher-order function

Reading Time: 3 minutes Higher-order function is an essential part of the functional programming paradigm. We must have defined a lot of functions in any language where we pass either primitive types or an object as an argument and returns the same. These are normal functions or methods. Then comes first-class functions. First-class functions are the functions that are treated as values. It means, those functions can be assigned Continue Reading

Functional Java: Should I really start using the functional paradigm in Java?

Reading Time: 5 minutes I am pretty sure, at some point, you must have had this question in your mind because everywhere, it is functional programming, immutability, higher-order functions, and blah blah. As a java developer, you must have confused, whether should I move to the functional programming paradigm? What are the benefits it provide to us? People are talking about it everywhere. So let’s give it a try Continue Reading

Functional Java: How to use a List in a functional way vs the imperative way

Reading Time: 3 minutes In my previous blog, we discussed how we can traverse a list in a functional way. There, first, we saw how we can do it in an imperative way and then moved ahead by modifying the code to reach the functional way. In this blog, we will explore some more uses cases of a list in a functional way and will compare it with the Continue Reading

RAP: Let’s discuss the architecture and technical details

Reading Time: 4 minutes In the previous blog, we discussed the journey and the features of RAP. In this blog, we will discuss the architecture and technical details. RAP Architecture: We have tried to follow the Domain-Driven Design and Reactive principles in designing RAP architecture. All RAP team members completed all the Reactive Architecture courses launched by Lightbend on cognitive classes to ensure adherence to reactive principles. These courses Continue Reading

RAP: The journey from a learning project to a useful product

Reading Time: 4 minutes A few months back, I was working on interesting customer engagement. Lagom was getting popularity, therefore, I and my few team members wanted to explore it to see if it would suit our needs. Just reading its documentation was not enough to get the proper practical hands-on. So we thought to do a project. The idea was that we should not build a dummy project, Continue Reading

Functional Java: Traversing a list in a functional way

Reading Time: 3 minutes In this blog, we will see how we can traverse a list in Java in a functional way. Iterating through a list is a basic operation on a collection, but over the years it’s gone through a few significant changes. We’ll begin with the old style and evolve an example—enumerating a list of names—to the elegant style. Let’s create a list first: final List<String> players = Arrays.asList(“Virat”, Continue Reading

Reactive Spring: Define a REST endpoint as a continuous stream

Reading Time: 2 minutes In the REST APIs, all Http requests are stateless. We fire the request and get the response, That’s it. It does not keep any state for any HTTP request. The connection between client and server is lost once the transaction ends, so 1 response for 1 request. But sometimes, we get the requirement to have a continuous response for a single request. This continuous response Continue Reading

Access multiple couchbase buckets from a Reactive Spring Boot application

Reading Time: 2 minutes A few days ago, I got a situation where I needed to access more than one couchbase bucket from a single reactive spring boot (Spring Web-flux) application. It is all about configuration. So, first of all, we will see how we can access a single couchbase bucket and then will move forward to access multiple buckets. Access Single bucket: To access a single bucket,  we Continue Reading

Reactive Java: Different flavors of querying the Couchbase using Spring Web Flux Reactive Couchbase API

Reading Time: 3 minutes As I am exploring Spring Web flux these days so I got an opportunity to explore the different ways of interacting with couch base using reactive APIs. We will not discuss how we can make a crud application in Spring Web flux. My main focus will be on, in how many different ways, we can query the couchbase with reactive couchbase API in Spring Web Continue Reading

Spring: Reactive programming in Java

Reading Time: 3 minutes Reactive programming is a programming paradigm that promotes an asynchronous, non-blocking, event-driven approach to data processing. Reactive programming involves modeling data and events as observable data streams and implementing data processing routines to react to the changes in those streams. In the reactive style of programming, we make a request for the resource and start performing other things. When the data is available, we get Continue Reading

Tired off creating Grafana dashboards manually? Let’s automate it.

Reading Time: 3 minutes We have already discussed the creation of Grafana dashboards and alerts in my previous blogs. We were doing that manually. But think of, if we need to do that in more than 10 environments then we need to repeat that manual process again and again and sometimes we get frustrated by doing all these repetitive stuff. We should have some automated process for doing this. So Continue Reading

Determine Kafka broker health using Kafka stream application’s JMX metrics and setup Grafana alert

Reading Time: 3 minutes As we all know, Kafka exposes the JMX metrics whether it is Kafka broker, connectors or Kafka applications. A few days ago, I got the scenario where I needed to determine Kafka broker health with the help of Kafka stream application’s JMX metrics. It looks bit awkward, right? I should use the broker’s JMX metrics to do this, why am I looking to application JMX Continue Reading

Need the Grafana slack monitoring alert? Let’s create it now.

Reading Time: 3 minutes In my previous blog, we created the first Grafana dashboard. Now in this blog, we will create our first monitoring Grafana alert. Before creating monitoring alerts, we need to add the notification channel through which we will be notified. Here, we will be adding slack as the notification channel. Slack notification channel: First, open the URL http://localhost:3000 in the browser and log in to the Continue Reading