Posts

Showing posts with the label transaction management

Observability Done Right: Best Practices and Anti-Patterns for Effective System Monitoring

Image
  WHAT Observability is a concept that refers to the ability to gain insights into the behavior and performance of complex systems. In the context of software engineering, observability involves the collection, analysis, and visualization of data from software applications, infrastructure, and other components of a system. In the animal kingdom, observability plays a critical role in survival, allowing animals to monitor their surroundings, detect threats, and find food. Dolphins use echolocation to observe their surroundings. They emit high-frequency sounds that bounce off objects, allowing them to create a 3D map of their environment. Thanks for reading Knowledge Cafe! Subscribe for free to receive new posts and support my work. Subscribed WHY In today's era, architectures are becoming increasingly large, complex, and fast-paced due to the faster development and deployment of software by distributed teams with the help of DevOps, continuous delivery, and agile development methodo...

Distributed Transaction in Spring Boot Microservices

Image
  Distributed transactions in microservices refer to transactions that involve multiple microservices, each handling a part of the transaction, and coordination is required to ensure the transaction’s atomicity, consistency, isolation, and durability (ACID) properties. Spring Boot provides several features to manage distributed transactions in a microservices architecture. Spring Boot can use either the 2PC or Saga pattern to manage distributed transactions, depending on the specific needs of the application. One way to implement 2PC in Spring Boot is to use the XA (eXtended Architecture) protocol, which allows multiple databases to participate in a single transaction. Spring Boot provides support for XA transactions through the Atomikos and Bitronix transaction managers, which can be used to coordinate transactions across multiple services. Another approach is to use the Saga pattern, which can be implemented in Spring Boot using the Spring Cloud framework. Spring Cloud provides a...