Posts

Logback Changes and Implementation

 In Java, You can use three type of logging implementation 1. Log4j2.x.x 2. Logback core 3. Slf4j  Here Slf4j implementation called as Simple Logging Facade For Java Simple Logging Facade for Java (abbreviated SLF4J) – acts as a facade for different logging frameworks (e.g. java. util. logging, logback, Log4j). In recent time to fix log4j vulnerability, I've came across lot of challenges and spend almost a month on same. So would like to share the easiest and best way for logging mechanisms based on experience. My choice would go to Logback : Logback  is a logging library used for Java-based applications and it starts where the first version of Log4j ends and promises to provide improvements to that.  Official site also says as below: Logback is intended as a successor to the popular log4j project,  picking up where log4j 1.x leaves off . Logback's architecture is quite generic so as to apply under different circumstances. At present time, logback is divided int...

ECMA Script - ES6 Features

 Why Should I Learn ES6? React uses ES6, and you should be familiar with some of the new features like: Classes Arrow Functions Variables (let, const, var) Array Methods like .map() Destructuring Modules Ternary Operator Spread Operator function calc(a,b){ const add = a+b; const sub = a-b; const mul = a*b; const div = a/b; return [add,sub,mul,div]; } const [add,sub,mul,div] = calc(2,2); console.log(calc(2,2));

Log4j2 Changes and Implementation

How to use latest Log4j2 changes into your application? Changing from Log4j-1.x.x version to latest jar Log4j2.17.1 Adding Log4j2 with SLF4J Add below changes into your pom.xml     <!-- This is option, It will automatically get added as indirect dependencies -->     <dependency>         <groupId>org.slf4j</groupId>         <artifactId>slf4j-api</artifactId>         <version>1.7.33</version>     </dependency>     <!-- Binding for Log4J -->     <dependency>         <groupId>org.apache.logging.log4j</groupId>         <artifactId>log4j-slf4j-impl</artifactId>         <version> 2.17.1 </version>     </dependency>    <!-- Log4j2 -->     <dependency>        ...

SOA :: Design Pattern

Message Screening Service Perimeter Guard Exception Shielding

Angular :: Reactive Pattern - Plain RxJs & State Management

Reactive style with plain RxJs - Patterns, Anti-Patterns, Lightweight State Management Stateless Observable based services Consuming Observable based services using Angular async Pipe Avoiding duplicate HTTP request with the RxJS shareReply operator Angular view Layer Pattern - Smart/Presentational Components Data modification in Reactive style (Stateless application)

Microservices - Software Architecture - Pattern & Techniques

 Advantages Low coupling Improves modularity Make use of parallel development Make use of scalability Drawbacks Infrastructure cost are usually higher Integration testing is bit complex Service management and deployment as single unit Nano service anti pattern (service is too fine grain) Use Cases: 1.] A bank is looking to develop a system for its new web platform that will be a long term project , and will therefore need to be scalable to support future growth Ans] Yes, this would be a suitable application of microservices architecture since it's a long term project, and a well-designed microservices-based system will support good scalability. 2.] An e-commerce website requires a small application that will be used for a short period to support a temporary promotion scheme that they will have.  Ans] This scenario is contrary to that of the previous question, since the application is not complex and will only be used for a short term it can be developed in less development int...

Employee - Leaves - Department :: SQL Queries

SQL Queries for learning: This application is used to keep track of information about employees of a company. It also stores the information about departments and leaves taken by employees. You are required to create tables (as shown below) and insert data into each of the table. Apart from giving you an idea about how to create tables with constraints, it also enables you to understand how to create queries, pl/sql programs, stored procedures and functions and database triggers. However, note, this sample collection of tables is only for learning purpose. Required Tables The following are the set of tables to be created to store the required information. Table Name Meaning DEPT Stores the details of departments of the company. EMPLOYEE Stores information about all the employees of the company. LEAVES Stores information about types of leaves available EMP_LEAVES Stores information about leaves taken by the employees. Structure of Tables The following is the structure of each of the req...