Posts

Showing posts from December, 2020

12 - Factor Cloud Based Microservices - App Principles

12-factor app is a methodology or set of principles for building the scalable and performant, independent, and most resilient enterprise applications. 12-factor app is a methodology or set of principles for building the scalable and performant, independent, and most resilient enterprise applications. It establishes the general principles and guidelines for creating robust enterprise applications. 12-factor app principles got very popular as it aligns with Microservice principles. The 12-Factor Principles Codebase (One codebase tracked in revision control, many deploys) Dependencies (Explicitly declare and isolate the dependencies) Config (Store configurations in an environment) Backing Services (treat backing resources as attached resources) Build, release, and Run (Strictly separate build and run stages) Processes (execute the app as one or more stateless processes) Port Binding (Export services via port binding) Concurrency (Scale out via the process model) Disposability (maximize th...

Java Intermediate Questions

Image
What is String in Java? String is a data type? String is a Class in java and defined in java.lang package. It’s not a primitive data type like int and long. String class represents character Strings. String is used in almost all the Java applications and there are some interesting facts we should know about String. String in immutable and final in Java and JVM uses String Pool to store all the String objects. Some other interesting things about String is the way we can instantiate a String object using double quotes and overloading of “+” operator for concatenation.   To create immutable class in java, you have to do following steps.        ·          Declare the class as final so it can’t be extended. ·          Make all fields private so that direct access is not allowed. ·          Don’t provide setter methods for variables...