Posts
Diagraming as Code and Modeling as Code
Level 1 : Context : 30 000 Foot view Level 2 : Containers : Bird Eyeview Level 3 : Components : Worm Eyeview Level 4 : Code :Worm Eyeview
C4 Architecture modeling uses Code UML Artecats to define code for that Simon Brown recomends PlantUML as the best Diagramming tool to use
1. Diagraming as Code with PlantUML PlantUML is Opensource and free
PlantUML is a highly versatile tool that facilitates the rapid and straightforward creation of a wide array of diagrams.
Posts
Install Gradle in Windows 11
1 Open this link : https://gradle.org/install/
2 open gradle release page : https://gradle.org/releases/
3 Click on binary Only : https://gradle.org/next-steps/?version=8.10.2&format=bin
4 Now click on verify SHA 256 Checksum (On download popup)
5 Open a command prompt to the downloads folder
cd Downloads dir # to display the SHA256 checksum type gradle-8.1.2-bin.zip.sha256 # display the SHA256 checksum of the zip file certutil -hashfile gradle-8.1.2-bin.zip SHA256 the two checksums should be the same Open the file in File Explorer
Posts
COBOL Tutorial
COBOL (Enterprise COBOL) 1. Code structure |123456 |7 |891011 |1213141516...72 |73747576 ... 80 | | | | | |Sequence | | | | |number Area| | | | | |Indicator| | | | | |A Area | | | | | |B Area | | | | | |Identification Area 1.1 Sequence Number Area Here’s how sequence numbers are used in COBOL: \
Sequence numbers identify lines and assist in version control.
Posts
Implementing JWT Tokens With Oauth in Spring Boot Microservices
Detailed Implementation of JWT Tokens in a Spring Boot Application with Keycloak Course: Spring Boot Security with JWT and Keycloak
Architecture Overview:
Keycloak Setup:
Keycloak: An open-source identity and access management solution that supports OAuth 2.0 and JWT. Configuration: Keycloak will be used to manage authentication and issue JWT tokens. Set up Keycloak with appropriate realms, clients, and roles. Spring Boot Application:
Authentication Server: Configure Spring Boot to use Keycloak for authentication and validate JWTs.
Posts
Java Interview Questions
1. What Causes Performance Issues on a Java Server? Course: Java Performance Tuning and Optimization
Explanation:
Inefficient Code:
Excessive use of synchronized blocks Large object creation Inefficient algorithms Inadequate Memory Management:
Memory leaks Improper use of data structures Excessive Garbage Collection:
Heap size not properly tuned Thread Contention:
Multiple threads accessing shared resources causing bottlenecks Improper Server Configuration:
Incorrect JVM settings Suboptimal use of hardware resources 1.1 detailed answers What Causes Performance Issues on a Java Server?
Posts
Threads in Java
A. Threads Simplified Summary of Threads in Java Threads in Java allow concurrent execution of two or more parts of a program to maximize the utilization of CPU. Java provides built-in support for multithreaded programming.
Creating Threads in Java 1. Extending the Thread Class Description: Create a new class that extends Thread and override the run method. Code Example: class MyThread extends Thread { public void run() { System.out.println("Thread is running"); } public static void main(String[] args) { MyThread t1 = new MyThread(); t1.
Posts
The Design Pattersn That Spring Boot and Spring Batch Is Built On
Spring Boot and Spring Batch leverage several design patterns from the Gang of Four (GoF) and Service-Oriented Architecture (SOA). These patterns help to create robust, maintainable, and scalable applications. Here’s an overview of some key design patterns used in these frameworks:
Gang of Four (GoF) Design Patterns Singleton Pattern:
Spring Boot: Used extensively for bean instantiation. The Spring container manages singleton beans, ensuring that only one instance of each bean is created and shared throughout the application.
Posts
Addressing Performance Issues in Java Apps and Java Webapps and Java Webservices and Spring Boot
Performance is a critical aspect of any application, especially in the realm of Java-based applications, web applications, web services, and Spring Boot applications. Ensuring optimal performance involves identifying and addressing potential bottlenecks and inefficiencies across various layers of the application. This article outlines common performance issues and provides strategies to mitigate them.
Database Performance N+1 Query Problem The N+1 query problem occurs when an application executes one query to fetch a list of entities and then executes additional queries to fetch related entities for each item in the list.
Posts
Hybernate Tutorial
The differences in how Hibernate is used in Spring, Spring Boot, and Spring Batch There are some differences in how Hibernate is used in Spring, Spring Boot, and Spring Batch. Here’s an overview of the key differences:
1. Spring Framework: In the traditional Spring Framework, Hibernate is integrated using a combination of XML configuration and Java-based configuration. You typically need to:
Configure DataSource: Define the database connection properties. Set up SessionFactory: Define a LocalSessionFactoryBean to configure Hibernate’s SessionFactory.
Posts
Create a Spring Barch Project
1. Simplified Architecture Scheduler └── JobLauncher └── JobRepository └── Job └── Step ├── ItemReader ├── ItemProcessor └── ItemWriter 1.1 Components Explained: Scheduler: Triggers the execution of batch jobs at scheduled intervals.
JobLauncher: Starts and controls the execution of Spring Batch jobs.
JobRepository: Manages metadata and state information about batch jobs, job instances, and step executions.
Job: Represents a logical batch job consisting of one or more sequential steps.
Step: Defines an individual unit of work within a job.