Spring Transaction Debugging in Prod With Lightrun

Spring makes building a reliable application much easier thanks to its declarative transaction management. It also supports programmatic transaction management, but that’s not as common. In this article, I want to focus on the declarative transaction management angle, since it seems much harder to debug compared to the programmatic approach.

This is partially true. We can’t put a breakpoint on a transactional annotation. But I’m getting ahead of myself.

Spring @Transactional Mistakes Everyone Makes

Probably one of the most used Spring annotations is @Transactional. Despite its popularity, it is sometimes misused, resulting in something that is not what the software engineer intended.

In this article, I have collected the problems that I have personally encountered in projects. I hope this list will help you better understand transactions and help fix a couple of your issues.

Practical Transaction Handling in Microservice Architecture

Introduction

It’s challenging to handle the complexities that come with a distributed system when moving away from a monolith to microservice architecture (MSA). Transaction handling is at the front and center of this issue. A typical database transaction done in a web application using local transactions is now a complicated distributed transaction problem. In this article, we will discuss what causes this, the possible solutions, and the best practices in developing safe transactional software systems using MSA.

If you are already familiar with the related concepts behind database transactions and the intricacies of data consistency in a distributed system, you can skip to the section on "Data Modelling in Microservice Architecture" where we explore how to model data with a real-world use case.

Intro to Couchbase Transactions Java API [Video]

This video, about Couchbase Distributed ACID Transactions, is a quick guide for you, the busy Java developer, on how to get started with the new API, including some important best practices you’ll want to implement. I’m not going to cover how transactions work or dive into ACID, as there are other resources being released that cover that.

Couchbase Transactions are available for Community Edition, and there are no new services to configure, and there’s nothing new to set up on the cluster. Just add a line to your Gradle or Maven project to pull in the library, and you’re ready to go — you can check out our documentation for transactions and the Java API documentation to get started.

Thoughts on Facebook’s Libra Cryptocurrency

Facebook announced recently that by 2020, they will roll out Libra — their blockchain-based cryptocurrency. It is, of course, major news, as it has the potential to disrupt the payment and banking sector. If you want to read all the surrounding newsworthy details, you can read the TechCrunch article. I will instead focus on a few observations and thoughts about Libra — from a few perspectives — technical, legal/compliance, and possibly financial.

First, replacing banks, bank transfers, credits cards, payment providers, and ATMs with just your smartphone sounds appealing. Why hasn’t anyone tried to do that so far — well, many have tried, but you can’t just have the technology and move towards gradual adoption. You can’t even do it if you are Facebook. You can, however, do it, if you are Facebook, backed by Visa, Mastercard, Uber, and many, many more big names on the market. So, Facebook got that right — they made a huge coalition that can drive such a drastic change forward.

Build a Blockchain PoC Application Using Hyperledger Fabric

This piece is about my experience in creating a blockchain PoC application for land and title recording on blockchain leveraging Hyperledger Fabric (HF) blockchain platform. It may benefit those who just got started on HF or intend to learn it, and for those who are already experienced in HF, it may offer another equally viable option. It’s pretty long, but for readers who are interested in blockchain technology, your time will be well spent.

Let us first set up our goal and see how we can achieve it.

How to Manage Transactions in Redis on Java

Transactions in Redis allow the execution of a group of commands to take place in a single step. Managing Redis transactions on Java can be tricky for some users, but it is much easier when you have the right tools at your disposal. In this post, you will learn all you need to know about the execution of Redis transactions on Java, as well as getting a brief insight into Spring Transaction Manager and XA Transactions for Redis.

Overview of Redis Transactions on Java

Redis transactions are atomic, meaning that either all the commands in the transaction are processed or none of them are. The commands are sequentially executed as a single isolated operation, with no option for a request issued by another client to be served in the middle of the execution of the transaction.

Tackling RESOURCE_LOCAL Vs. JTA Under Java EE Umbrella and Payara Server

Learning JPA is a road marked with a lot of questions. Some of the notorious questions include: "What is actually a persistence-unit?," "What is an extended persistence-context?," "Why is wrong to fetch read-only data as entities?," "Why should I care aboutRESOURCE_LOCALorJTA?," and so on and forth. 

This article targets people that are confused by the JPA transaction types,RESOURCE_LOCAL, andJTA. But, let's take it step by step.