Home » #coding » Page 3

#coding

Spring Fundamentals

Welcome to our comprehensive guide on Spring Fundamentals! In this page, we will take you on a journey to explore the core concepts and foundational principles that make Spring one of the most popular frameworks for Java application development. Spring is an open-source framework that provides a comprehensive programming and configuration model for building enterprise-grade […]

Spring Fundamentals Read More »

Inversion of Control and Dependency Injection

IOC Container Spring IoC (Inversion of Control) Container is the core of Spring Framework. It creates the objects, configures and assembles their dependencies, manages their entire life cycle. It receives instructions about the same from the provided configuration metadata. and uses Dependency Injection(DI) to manage the components that make up the application. Means for providing the

Inversion of Control and Dependency Injection Read More »

Semaphore Class

A semaphore controls access to a shared resource through the use of a counter. What the counter is counting are permits that allow access to the shared resource. Thus, to access the resource, a thread must be granted a permit from the semaphore. Synchronized allows only one thread of execution to access the resource at the same time. Semaphore

Semaphore Class Read More »

Lock Interface

The lock interface is one of the most used interfaces in Java. Lock interface is available in the Java.util.concurrent.locks package which we use as a thread synchronization mechanism, i.e., similar to synchronized blocks. It is more flexible and provides more options in comparison to the synchronized block. It allows us to gain the benefit of fine-grained locking without having

Lock Interface Read More »

Fork/Join Framework

Java 7 introduced the fork/join framework. It is among the simplest and most effective design techniques for obtaining good parallel performance. Fork/join algorithms are parallel versions of familiar divide−and−conquer algorithms. The fork operation starts a new parallel fork/join subtask. The join operation causes the current task not to proceed until the forked subtask has completed.

Fork/Join Framework Read More »

Java Executor Framework

Java concurrency API includes the executor framework since java  5 to improve the performance of concurrent applications with a lot of concurrent tasks. It is a mechanism that allows you to separate thread creation and management for the implementation of concurrent tasks. You don’t have to worry about the creation and management of threads, only

Java Executor Framework Read More »

Microservices

41. What is the role of web and RESTful APIs in Microservices?A microservice architecture is based on a concept wherein all its services should be able to interact with each other to build a business functionality. So, to achieve this, each microservice must have an interface. This makes the web API a very important enabler

Microservices Read More »

Microservices

31. How to maintain ACID transactions in Microservices?ACID is an acronym for four primary attributes namely atomicity, consistency, isolation, and durability ensured by the database transaction manager.  In a distributed system involving multiple databases, we have two options to achieve ACID compliance:  2 Phase Commit should ideally be discouraged in microservices architecture due to its

Microservices Read More »

Microservices

1. What are Microservices?Microservices is an architectural style which structures and application as a collection of loosely coupled, independently maintainable, testable and deployable services which are organized around business capabilities. If you have a business focus and you want to solve a use case or a problem efficiently without the boundaries of technology, want to scale

Microservices Read More »

Spring

41. Differentiate between WebClient and WebTestClient?The difference between the Web client and Webtestclient can be stated as follows. Web client Webtestclient Web client acts as a reactive client who performs non-blocking HTTP requests.  Webtestclient also acts as a reactive client that can be used in tests. It can handle reactive streams with backpressure. It can

Spring Read More »

Scroll to Top