Java

Passing query parameters through your WebClient

Reading Time: 5 minutes We can use spring-boot:webflux’s WebClient to invoke a third-party service from within our spring boot application. This is asynchronous and reactive method supplied by spring for invoking of unmanaged services. We also saw how we can pass query params when invoking a 3rd party service and which case to chose with our requirements. Be cautious with what you are using and always document what you want and what you created so that things like these can be caught early during the development phase.

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

Functional Java: Understanding Pure Functions with JAVA

Reading Time: 3 minutes Functional programming is a programming paradigm which is gaining its popularity day by day. It revolves around binding everything in pure mathematical functions style. It is is the process of building software by composing pure functions, avoiding shared state, mutable data, and side-effects. Functional programming is declarative rather than imperative, and application state flows through pure functions. We call it as a declarative type of 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

Scala Traits – Let’s mix it up a bit

Reading Time: 6 minutes Scala has way too many unique features that have always stunned the developers worldwide. Some of its features like Lazy evaluation, case classes, etc. have totally changed the coding standards for good. In this blog today, we will be taking you on a small tour to one of these unique and mesmerizing features that Scala has in store for its users i.e Scala Trait Mixin. 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

Merge Lists of Map to Map, Java 8 Style!

Reading Time: 3 minutes Today, while doing my work and having fun programming, I came across a problem that looked pretty easy in the beginning, but after starting doing it, had to take help of Google and read from different sites to get to a nice implementation. So, let’s look at the problem and how to solve it. The Problem Well, you guys probably already have guessed what the Continue Reading

Java concurrency: Reentrant Locks

Reading Time: 3 minutes Hello readers! Welcome to another blog in the Java concurrency series. Today, we are going to look at the Reentrant Locks in Java. What it is, how to use it, and mainly, what is the difference between using Reentrant Locks and synchronization. So, let’s dive straight into it. Reentrant Locks Reentrant locks work just like the synchronized locks in java, but have much more facilities Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!