Posts

ACID SOLID

ACID properties ensure data integrity and reliability in Relational Database Management Systems (RDBMS).  ACID stands for: 1) ATOMICITY  – Ensures that a transaction is all or nothing. If any part fails, the entire transaction is rolled back. 2) CONSISTENCY  – Guarantees that a transaction maintains database integrity, ensuring valid state transitions. 3) ISOLATION  – Prevents transactions from interfering with each other, ensuring concurrent execution does not cause conflicts. 4) DURABILITY  – Ensures that once a transaction is committed, it remains permanent, even in case of system failures. These properties help databases maintain accuracy, reliability, and consistency in multi-user environments. ----------------------------------------------------------------------------------------------------------------------------- SOLID principles of Object-Oriented Programming (OOP) A foundational set of design guidelines that help developers write cleaner, more maint...

Migrate SpingBoot Application

To migrate your Spring Boot application from version 3.1.0 to 3.4.3, here are the steps you can follow: Review Release Notes: Go through the Spring Boot release notes for versions 3.2.x, 3.3.x, and 3.4.x to understand new features, deprecations, and breaking changes. Update Dependencies: Modify your pom.xml (Maven) or build.gradle (Gradle) file to update the Spring Boot version to 3.4.3. Ensure all dependencies are compatible with Spring Boot 3.4.3. Check for any version-specific changes in libraries like Spring Security, Hibernate, etc. Check Configuration Properties: Some configuration properties might have been renamed or removed. Use the spring-boot-properties-migrator dependency to identify and migrate these properties. Upgrade Java Version: Spring Boot 3.x requires Java 17 or higher. Ensure your application is running on a compatible Java version. Update Build Tools: If you're using tools like Maven or Gradle, ensure they are updated to the latest versions to support Spring B...

Build Automation

ANT: Ant was the first build tool released in 2000. Ant was developed on procedural programming idea. Ant was improved with an ability to accept plug-ins and dependency management over the network, with the help on Apache-IVY. Drawbacks: 1) XML is used as a format to write the build scripts. 2) Being hierarchical is not good for procedural programming, and 3) XML is relatively unmanageable.   MAVEN: Maven was introduced in 2004. Maven relied on the conventions and was able to download the dependencies over the network. Benefits : Life cycle of Maven, while following the same life cycle for multiple projects continuously. Problems: 1) Maven does not handle the conflicts between versions of the same library. 2) Complex customised build scripts are difficult to write in Maven, as compared to writing the build scripts in ANT. GRADLE : Gradle came into picture in 2012 Features  Declarative builds and build-by-convention 1) Gradle is available with separate Domain Specific Language ...

Workflow Orchestration

Workflow Orchestration Workflow Orchestration is the end-to-end management of people, digital workers, systems, and data in a process. Workflow orchestration is the process of managing and coordinating tasks, systems, and processes to achieve a specific goal. Workflow orchestration involves designing, executing, and optimizing workflows to ensure that all elements work together smoothly. Netflix Conductor Workflow Implementation Nitish URL - https://nitish1503.medium.com/workflow-orchestration-using-netflix-conductor-1047cff467d9 Conductor allows you to build a complex application using simple and granular tasks. Conductor keeps track of the state, calls tasks in the right order (sequentially or in parallel, as defined), retry calls if needed, handle failure scenarios gracefully, and outputs the final result. Workflows Workflow Definition Workflow Definitions are like OOP classes A Workflow Definition contains a collection of Task Configurations.  This is the blueprint which specif...

PL/SQL

PL/SQL PL/SQL stands for Procedural Language extensions to the Structured Query Language (SQL). PL/SQL can execute a number of queries in one block using single command. One can create a PL/SQL unit such as procedures, functions, packages, triggers, and types, which are stored in the database for reuse by applications. The PL/SQL engine resides in the Oracle engine. The Oracle engine can process not only single SQL statement but also block of many statements. Structure of PL/SQL Block: DECLARE     declaration statements; BEGIN     executable statements EXCEPTIONS     exception handling statements END; / Example : SET SERVEROUTPUT ON; SQL> DECLARE        var varchar2(40) := 'I love GeeksForGeeks' ;      BEGIN        dbms_output.put_line(var);      END;      / PL/SQL Functions PL/SQL functions are reusable blocks of code that can be used to perform specific tasks. They are...

Java Application Performance

Java Application Performance Java performance refers to the speed and efficiency of a Java application or system, and is typically measured by the amount of time it takes to complete a particular task or the amount of resources it uses to do so.  Performance is a critical factor in many applications, particularly those that require real-time processing, high throughput, or low latency. 5 Common Java Performance Problems   a) Memory Leaks and Out of Memory Errors   b) Thread Deadlocks   c) Garbage Collection   d) Code-Level Issues   e) Pool Connections Steps to improve the performance of Java applications:   1) Choose the Performance Parameters to Tune       Footprint - Memory and CPU       Throughput - Work       Latency - Time   2) Identify the System’s Limits   3) Use a Profiler to Handle Bottlenecks   4) Create a Performance Test Suite 8 Tips for Optimizing and Improving Java Performance: ...

Comparable vs Comparator in Java

Comparable vs Comparator in Java Java provides two interfaces to sort objects using data members of the class:   1) Comparable   2) Comparator Comparator A comparator interface is used to order the objects of user-defined classes. A comparator object is capable of comparing two objects of the same class. public int compare(Object obj1, Object obj2): class Sortbyname implements Comparator<Student> {   // Method   // Sorting in ascending order of name   public int compare (Student a, Student b) {     return a.name.compareTo(b.name);   } } Comparable A comparable object is capable of comparing itself with another object. class Movie implements Comparable<Movie>{   public int compareTo (Movie m) {     return this.year - m.year;   } } using comparator we were able to use different attributes. using comparable we can use only one comparison.