Home » Author Archives: Biju Kunjummen (page 3)

Author Archives: Biju Kunjummen

Scala extractors infix sample with Rational numbers

scala-logo

I keep coming back to the awesome introductory material on Scala put together by Daniel Westheide. One of the examples that he provides for extractors using an infix operation pattern is the Streams API – val xs = 58 #:: 43 #:: 93 #:: Stream.empty xs match {   case first #:: second #:: _ => first - second   ...

Read More »

Gentle Introduction to Hystrix

java-interview-questions-answers

In the last few days I have been exploring the Netflix Hystrix library and have come to appreciate the features provided by this excellent library. To quote from the Hystrix site: Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in ...

Read More »

Spring Cloud Sidecar – Initialization of Nodes

spring-interview-questions-answers

In the last blog post I had described how the Sidecar application can be used for registering the Cassandra nodes with Eureka and more generally can be used for registering any non-JVM application with Eureka. In this post I will cover how an application can go about querying the Sidecar registered nodes. Discovering Registered Nodes – Post Initialization If the ...

Read More »

Spring Cloud Sidecar

spring-interview-questions-answers

I have an application deployed to a NetflixOSS based cloud which has a structure along these lines: Essentially a service which persists information to a Cassandra cluster. All the applications are registered to Eureka – so in this instance the service as well as the Cassandra nodes are registered with Eureka, further the service connects to the Cassandra cluster by ...

Read More »

Rest client calls with Spring Cloud

spring-interview-questions-answers

There are a few interesting ways to make REST client calls with the Spring-Cloud project. Spring-Cloud rest support builds on top of the core Netflix OSS libraries, but abstracts them and in the process simplifies using the libraries. RestTemplate As a first step let us consider the traditional way to make Rest calls through Spring based applications, using RestTemplate: public ...

Read More »

Couchbase Java SDK with Rx-Java

couchbase-logo

A neat thing about CouchbaseJava SDK  is that it is built on top of the excellent Rx-Java library, this enables a reactive way to interact with a Couchbase server instance which is very intuitive once you get the hang of it. Consider a very simple json document that I intend to store in Couchbase: {"key":"1","value":"one"} and a Java class to hold ...

Read More »

Using Java 8 CompletableFuture and Rx-Java Observable

java-logo

I wanted to explore a simple scatter-gather scenario using Java 8 CompletableFuture and using Rx-Java Observable. The scenario is simple – Spawn about 10 tasks, each returning a string, and ultimately collect the results into a list. Sequential A sequential version of this would be the following: public void testSequentialScatterGather() throws Exception { List<String> list = IntStream.range(0, 10) .boxed() .map(this::generateTask) ...

Read More »

Learning Spring-Cloud – Writing a microservice

spring-interview-questions-answers

Continuing my Spring-Cloud learning journey, earlier I had covered how to write the infrastructure components of a typical Spring-Cloud and Netflix OSS based micro-services environment – in this specific instance two critical components, Eureka to register and discover services and Spring Cloud Configuration to maintain a centralized repository of configuration for a service. Here I will be showing how I ...

Read More »

Learning Spring-Cloud – Infrastructure and Configuration

spring-interview-questions-answers

I got a chance to play with Spring-Cloud to create a sample set of cloud ready microservices and I am very impressed by how Spring-Cloud enables different infrastructure components and services to work together nicely. I am used to creating microservices based on Netflix OSS based stack and typically in a Netflix stack Eureka is considered the hub using which ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns