Home » Author Archives: Biju Kunjummen

Author Archives: Biju Kunjummen

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 »

Rx-netty and Karyon2 based cloud ready microservice

java-interview-questions-answers

Netflix Karyon provides a clean framework for creating cloud-ready micro-services. In your organization if you use the Netflix OSS stack consisting of Eureka for service registration and discovery, Archaius for property management, then very likely you use Karyon to create your microservices. Karyon has been undergoing quite a lot of changes recently and my objective here is to document a ...

Read More »

Akka samples with scala and Spring

akka-logo

I was looking around recently for Akka samples with Spring and found a starter project which appeared to fit the bill well. The project however utilizes Spring-Scala which is an excellent project, but is no longer maintained. So I wanted to update the sample to use core Spring java libraries instead. So here is an attempt on a fork of ...

Read More »

Netflix Archaius for property management – Basics

java-interview-questions-answers

Netflix Archaius provides a neat set of features to load dynamic properties into an application. This blog post is just a documentation of the extent of Archaius that I have understood, there is much more to it than I have documented here, but this should provide a good start:     Default Behavior Consider a simple properties file: stringprop=propvalue listprop=value1, ...

Read More »

Spring-session demonstration using docker-compose

spring-interview-questions-answers

I have earlier written about an exciting new project called Spring-session which provides a clean way to externalize user sessions for java based web applications. I managed to get a good demonstration set-up for spring-session using docker-compose which shows off the strengths of this project and I wanted to write about this here. In short, this is the set-up that ...

Read More »

Spring Enable annotation – writing a custom Enable annotation

spring-interview-questions-answers

Spring provides a range of annotations with names starting with Enable*, these annotations in essence enable certain Spring managed features to be activated. One good example of such an annotation is EnableWebMvc which brings in all the beans needed to support a MVC flow in Spring based applications. Another good example is the EnableAsync annotation to activate beans to support ...

Read More »

Hot and cold rx-java Observable

java-logo

My own understanding of Hot and Cold Observable is quite shaky, but here is what I have understood till now! Cold Observable Consider an API which returns an rx-java Observable: import obs.Util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import rx.Observable; import rx.schedulers.Schedulers; public class Service1 { private static final Logger logger = LoggerFactory.getLogger(Service1.class); public Observable<String> operation() { return Observable.<String>create(s -> { logger.info("Start: ...

Read More »

Using rx-java Observable in a Spring MVC flow

spring-interview-questions-answers

Spring MVC has supported asynchronous request processing flow for sometime now and this support internally utilizes the Servlet 3 async support of containers like Tomcat/Jetty. Spring Web Async support Consider a service call that takes a little while to process, simulated with a delay: public CompletableFuture<Message> getAMessageFuture() { return CompletableFuture.supplyAsync(() -> { logger.info("Start: Executing slow task in Service 1"); Util.delay(1000); ...

Read More »

Netflix Archaius properties in a Spring project

spring-interview-questions-answers

Archaius Basics Netflix Archaius is a library for managing configuration for an application. Consider a properties file “sample.properties” holding a property called “myprop”:               myprop=myprop_value_default This is how the file is loaded up using Archaius: ConfigurationManager .loadCascadedPropertiesFromResources("sample"); String myProp = DynamicPropertyFactory.getInstance().getStringProperty("myprop", "NOT FOUND").get(); assertThat(myProp, equalTo("myprop_value_default")); Archaius can load property appropriate to an environment, consider ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.