Posts

Netflix Hystrix Circuit Breaker

Image
Netflix Hystrix Circuit Breaker In one of my previous blogs, I have already discussed the Circuit breaker pattern and its usage, Today, we will see how can we implement it in our application using Spring Cloud Netflix Hystrix . In this document, I’ll walk you through the process of applying circuit breakers to potentially-failing method calls using the Netflix Hystrix fault tolerance library. Hystrix is watching methods for failing calls to related services. If there is such a failure, it will open the circuit and forward the call to a fallback method. To understand it in a better way, I’ll take the same problem statement that I have already discussed in my previous blog i.e. E-commerce Portal.  I am assuming you must be aware of Spring boot framework as this implementation is completely based on it. As per problem statement, we need two applications i.e. Product Service & Price Service but in this tutorial, I’ll talk about just Product Service as Price Service ...

Circuit Breaker and Microservices Architecture

Image
Circuit Breaker and Microservices Architecture  In this article, I’ll talk about the Circuit Breaker pattern which is widely used in Microservices but before jumping to Circuit breaker design pattern or microservices. Let’s first understand the requirement so that you should know where we can use it in our application and Of Couse, How 😊 Let’s understand it with the real scenario as It’s already June month and we know there are so many online summer sales is going to start where they will offer you a various type of deals on their products. And as we know most of the online portal has upgraded their application arch from Monolithic design to Microservices like Amazon, Flipkart, Snapdeal and so on and with that their each service will be running as an independent micro-services in the cloud like Authentication Service using which a user can be logged in to the application, Product Detail Service, Billing Service, Price Service, Card Services, etc. Now just imagine the sce...

Installing Apache Kafka and Zookeeper on Windows

Image
In this article, I’ll talk about how to Install, configure and start Apache Zookeeper and Apache Kafka Server on Windows OS. Prerequisite JRE running on your machine and path must set to Environment Variable Any Zip tool like 7-zip , WinZip or WinRAR. Download and Extract Apache Zookeeper using 7-zip. Download and Extract Apache Kafka using 7-zip ZooKeeper Installation Instructions: Go to the conf directory of your Zookeeper. For me its under D:\Softwares\apache-zookeeper-3.5.5 Copy and rename zoo_sample.cfg to zoo.cfg file. Open and Edit dataDIr=/tmp/zookeeper to dataDir=D:\Softwares\apache-zookeeper-3.5.5 Add entries in System Environment Variables ZOOKEEPER_HOME=D:\Softwares\apache-zookeeper-3.5.5 Append D:\Softwares\apache-zookeeper-3.5.5\bin to PATH system variable. Open command prompt and type zkserver to start the Zookeeper application. You can easily edit the default port ( 2181) in zoo.cfg file. Congratulations, ZooKeeper is up and...

JAVA 11 – New String methods

JAVA 11 – New String methods In this blog, we will discuss about all six new methods which got introduced with JDK 11. isBlank(): returns true if string is empty otherwise false. White spaces code will also be considered as empty string. // Java 8 Predefine Functional Interface              // The best way to learn JAVA 8 is to implement it wherever you can...              BiConsumer<String, String> display = ( msg1 , msg2 ) -> System. out .println( msg1 + msg2 );              // local variable type inference              var msg = "Welcome to waheedtechblog page" ;              // String msg = "Welcome to waheedtechblog page"; both are same ...