Skip to main content


Showing posts from May, 2017

Progressive Web Apps

Deliver amazing user experience for WEB
Progressive Web Apps (PWA) are user experience that reach for web. Its useful to users from the very first visit with no installation required. As the user spends more time with the web app it becomes more and more powerful, It loads quickly even on slower networks. Can have offline support, push notification, icon on home screen, full screen support. PWA are:
Reliable - load instantly even on slower/uncertain network.Fast - Respond quickly to user interactionsEngaging - Feel like natural app on device with amazing user experience.Reliable When launched from the user’s home screen, service workers enable a Progressive Web App to load instantly, regardless of the network state. A service worker, written in JavaScript, is like a client-side proxy and puts you in control of the cache and how to respond to resource requests. By pre-caching key resources you can eliminate the dependence on the network, ensuring an instant and reliable ex…

MongoDB Setup & Overview

MongoDB is an open source, document oriented NoSQL database where data is represented & stored in the form ofBSON(binary JSON) ” 

Following is a key value representation of data in JSON format and its corresponding BSON.It adds some "extra" information to documents, like length of string and sub-objects. This makes traversal faster.

// JSON file
   { "hello" : "world" }

// BSON file

\x16\x00\x00\x00 // total document size \x02 // 0x02 = type String hello\x00 // field name \x06\x00\x00\x00world\x00 // field value \x00 // 0x00 = type end of object With the growing use of Social Media platforms, large chunks of unstructured data was created .Thus, a need to to persist this unstructured data in the most efficient way possible hence N…

Java 8 - Lambda Expression

Java 8 Lambda ExpressionWhat is lambda expression ?In mathematics and computing generally, a lambda expression is a function for some or all combinations of input values it specifies an output value. Lambda expressions in Java introduce the idea of functions into the language. In conventional Java terms lambdas can be understood as a kind of anonymous method with a more compact syntax that also allows the omission of modifiers, return type, and in some cases parameter types as well.

The problem of bulky syntax is refereed as “Vertical Problem” by Java people and Java 8 provides a Lambda expression to gives a very simple yet powerful functional programming capability to Java.

Functional Interface Functional interfaces have a single functionality to exhibit. An interface which has only one abstract method is called functional interface. For example, a Comparable interface with a single method ‘compareTo’ is used for comparison purpose. Java 8 has defined a lot of functional interfaces t…

Zuul Edge Server

Zuul to Proxy your Microservices A common challenge when building microservices is providing a unified interface to the consumers of your system. The fact that your services are split into small composableappsshouldn’t be visible to users or result in substantial development effort. To solve this problem, Netflix created and open-sourced its Zuulproxy server. Zuul is an edge service that proxies requests to multiple backing services. It is “front door” to your system, which allows a browser, mobile app, or other user interface to consume services from multiple hosts without managing cross-origin resource sharing (CORS) and authentication for each one. Spring Cloud has created an embedded Zuul proxy to ease the development of a very common use case where a UI application wants to proxy calls to one or more back end services. This feature is useful for a user interface to proxy to the backend services it requires, avoiding the need to manage CORS and authentication concerns independentl…

Ribbon , Hysterix using Spring Feign

The idea about this post is show some concept of Load Balancing  & Circuit Breaker using Spring Cloud Netflix API. Load Balancing Load Balancing automatically distributes incoming application traffic between number of nodes running for given application. Ribbon : This provide client side load balancing. Its component offers a good set of configuration options such as connection timeouts, retries, retry algorithm  etc. Strategies offered by ribbon are listed below: Simple Round Robin LBWeighted Response Time LBZone Aware Round Robin LBRandom LB Circuit Breaker pattern Netflix’s Hystrix library provides an implementation of the Circuit Breaker pattern: when we apply a circuit breaker to a method, Hystrix watches for failing calls to that method, and if failures build up to a threshold, Hystrix opens the circuit so that subsequent calls automatically fail. While the circuit is open, Hystrix redirects calls to the method, and they’re passed on to our specified fallback method. Spring p…