Questions tagged [transaction]

Questions about maintaining consistency between a set of related operations, in a way that either all succeed, or the state of the system remains unchanged.

Questions about maintaining consistency between a set of related operations, in a way that either all succeed, or the state of the system remains unchanged.

114 questions
15
votes
3 answers

Does SOA service composition actually work in practice?

One of the main SOA service design principles is Service Composability principle (https://en.wikipedia.org/wiki/Service_composability_principle). The idea is that by composing new services using existing ones as building blocks, one can rapidly…
Janne Mattila
  • 260
  • 1
  • 6
12
votes
4 answers

How to handle transactional operations in an event-driven architecture?

I'm trying to flesh out an eCommerce system using microservices (.NET Core and Kubernetes), event sourcing (Kafka), and CQRS. The particular use case I've been thinking about is as follows. There is an inventory microservice designed to use CQRS. …
12
votes
2 answers

How is transactionality implemented in DDD applications?

I have been searching and reading recently about DDD and, so far, I think I understood its fundations. If I understood well, the architecture is similar to this: Database <--SQL--> DAO/ORM <--CRUD--> Repository/Aggreagtes <--Business--> **¿?** <--…
Laiv
  • 14,283
  • 1
  • 31
  • 69
12
votes
5 answers

Should a single failure fail a bulk operation?

In the API I'm working on there's a bulk delete operation which accepts an array of IDs: ["1000", ..., "2000"] I was free to implement the delete operation as I saw fit, so I decided to make the whole thing transactional: that is, if a single ID is…
rath
  • 856
  • 8
  • 20
12
votes
2 answers

Separating Business logic from DB-logic with transactions

We have three layers in our application. Service layer to provide an external API. BO layer for our business logic, and a DAO layer for our database connection. Let's say every time we update a File, we also want to change something in the Folder,…
Serge Hendrickx
  • 229
  • 2
  • 6
12
votes
3 answers

How to manage 2 DAO methods in a single transaction?

In an interview someone asked me : How do we manage 2 transactional/dao methods in a single transaction. Desired capabilities: If anyone of them fails we need to rollback both methods. Both of the methods can be called separately attached with a…
Satish Pandey
  • 1,340
  • 3
  • 10
  • 20
10
votes
2 answers

Eventual consistency in Banking systems

I keep hearing people say Banking systems like ATM use Eventual consistency model for data synchronization, but I am wondering if it is true. Definitely the amount you withdraw might be delayed showing in your banking statement, but I assume they…
9
votes
7 answers

Algorithm for determining transactions among weekly data series?

I'm trying to develop a small reporting tool (with sqlite backend). I can best describe this tool as a "transaction" ledger. What I'm trying to do is keep track of "transactions" from weekly data extract: "new" (or add) - resource is new to my app…
Swartz
  • 141
  • 3
7
votes
4 answers

DB transactions necessity

I have recently come across a concept of transactions. Seems like they are a crucial feature for production applications, yet I have never heard about them except once in a university. I can't remember a single tutorial on youtube / udemy that…
7
votes
2 answers

Are bank transactions run with DB transactions?

The classic example for a transaction is withdrawing money from a savings account and depositing it to a checking account in the same bank. Yet I have the suspicion that DB transactions are actually not used for such examples, but rather that…
Joshua Fox
  • 1,090
  • 10
  • 18
7
votes
2 answers

Information sharing in event-based systems

I'm developing a software system, which provides HTTP REST API, and I want to achieve a very modular and flexible design. So, there is a core functionality and feature modules, which handle only the logic related to each specific feature. The goal…
7
votes
3 answers

Transaction handling in DAO or Service layer in pure JDBC without frameworks

I have an application which works with pure JDBC. I have a dilemma where should transaction handling go, in Service or DAO layer. I have found that in most cases it should be implemented in Service layer since DAO must be as simple as possible and…
rand0rn
  • 189
  • 1
  • 1
  • 7
7
votes
1 answer

Does a batch of operations violate REST principles?

Does it violate REST principles for a REST API to support a batch of operations (perhaps with transactional guarantees) that can be added to a queue via a POST? This design seems outside the scope of REST architecture but not necessarily in…
Will
  • 712
  • 5
  • 12
7
votes
1 answer

Alternatives to Pessimistic Locking in Cluster Applications

I am researching alternatives to database-level pessimistic locking to achieve transaction isolation in a cluster of Java applications going against the same database. Synchronizing concurrent access in the application tier is clearly not a…
amphibient
  • 1,581
  • 2
  • 16
  • 24
6
votes
3 answers

DDD: deciding when to lean towards eventual vs transactional consistency

I am reading Vaughn Vernon's series of articles about effective aggregate design. On the subject of deciding between transactional vs eventual consistency, it states the following: Discussing this with Eric Evans revealed a very simple and sound…
1
2 3 4 5 6 7 8