Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [transaction]

The tag has no usage guidance.

1
vote
1answer
51 views

Is there some solutions that enable to perfrom sub transactions on business model?

My question is in the header. I would like to know is there architectural solution that enables to perform nested transactions on the business model. Let me to explain - the standard flow for web ...
2
votes
2answers
219 views

How are transactions on ATMs and their banks typically synchronized?

There are points of failure: ATM gives money then send a deduction request to it's bank. What happens, if the request will fail? the user got the money but his account hasn't been deducted - fail. ...
3
votes
4answers
318 views

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 ...
0
votes
1answer
107 views

Dealing with eventual consistency when persisting and publishing events

Currently working on a DDD application that is using event sourcing with redis as my main persistence store. So unfortunately I do not have built in rollbacks should something fail. The application is ...
5
votes
1answer
154 views

Achieving scalability and ACID with a RDBMS to NoSQL streaming solution

My understanding is that the main feature Cassandra has to offer is linear performance at any scale; meaning that if I know 1 C* node can handle 500 queries or commands per second from my app, then I ...
3
votes
2answers
134 views

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 ...
0
votes
1answer
56 views

Is it ok to have transaction at Presentation level?

Let's assume that I have an Order object that has a List<OrderItem> , the user goes to page and creates his order, now I should save his selection to the database, I have two data service ...
0
votes
2answers
185 views

Optimistic locking with business constraints [closed]

Consider this simple example: Tables (in a restaurant) can be booked for a period. Business constraint: No two table bookings for the same table may overlap in time. How might one prevent business ...
1
vote
2answers
784 views

Web API : Centralize business transaction logic : Good Idea?

We develop on a ASP.NET Web API where we use the "Unit Of Work / Repository" pattern : Our Controllers looks like that : public class MyController : Controller { private IUnitOfWork _unitOfWork; ...
3
votes
1answer
107 views

System design: transactional inserts at application level

I have a system which hits a API on daily basis and collects data. This data is divided into logical groups, with a logical group defined as all data belonging to a particular user. A user has 30 ...
3
votes
2answers
81 views

Guaranteeing transactions with multiple Listeners

Recently my team has inherited a code-base with an interesting problem. The system keeps historical records by having multiple listeners on the same event. These listeners execute serially, so if we ...
1
vote
0answers
45 views

idempotency and store with notify

I would like to ask what is a prefered way when you have such a code, (this is distributed transaction since I cannot delete the item and publishToKafka atomically), and I don't want to have event ...
1
vote
0answers
279 views

Distributed transactions and recovery with stateless microservices

I suppose I have the following use case: I want a synchronous service if possible (in case of machine crash I want to finish it in background, by some other node) I want to save something in my ...
1
vote
3answers
423 views

How to handle parallel requests, different response time and atomicity of transactions

I have a table of data and I can create , update and delete rows. I have apis to do these operations. The following steps happen I create a row and send a create request to server. I update some ...
6
votes
2answers
153 views

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 ...
1
vote
1answer
87 views

Transaction with web services

I am wondering how transactions with web services are achieved. Let's take an online store for example that needs to deal with 3 services: Inventory management SaaS Delivery management Saas Payment ...
-3
votes
2answers
133 views

How to deal with small frequent transactions

I have been given the task to create a system in which users can buy intellectual property (broadly categorized, hard to explain what they are really buying) from the system and can transfer funds ...
0
votes
2answers
1k views

TransactionScope in business or data/repository class?

What is the best place to use TransactionScope class? Is it in the business logic or data/repository classes? Example if used in business logic class: using (var scope = new TransactionScope()) { ...
1
vote
1answer
322 views

Does separating Domain model and Persistence model have impact on transactional aspect?

In this post, there is: For example, with your own persistence model, you are not able to benefit from the built-in change tracking functionality. And that means you will not be able to ...
6
votes
1answer
234 views

How can I avoid a cross aggregate transaction?

Consider this simplified example: In an online ticket sale website, tickets have variable prices that change over time. User searches for tickets. Once he finds a ticket he wants, clicks "Buy" and ...
3
votes
1answer
60 views

Post and Stats - Should normalization or keep it together?

I have posts table: id (int) index uid (int) text (text) created (int) is_deleted (tinyint) and a table to store post stats: post_id (int) index comments (int) shares (int) views (int) Now when I ...
2
votes
2answers
303 views

Transactions with actors

I know that transactions use locks. It is claimed that actors liberate us from shared state and locks make sure all crashes are the same as clean shutdowns: this can be done through practices such ...
4
votes
3answers
6k views

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 ...
4
votes
1answer
96 views

Transactional requests and failure recovery in database systems

Let's say we deal with a quite naive, simple version of a database, which uses the classic version of redo-undo logs for failure recovery. For a "classic" request transferring an amount from one ...
4
votes
1answer
1k views

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 <...
12
votes
5answers
578 views

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 ...
3
votes
2answers
194 views

Receiving lots of records and storing them in a database in a short time frame

A colleague has challenged me with an interesting question. To be honest I have no idea how to deal with it. Suppose the following: Every 5 minutes you get a new file with one hundred thousand ...
9
votes
2answers
1k views

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,...
0
votes
2answers
63 views

Request-based memory allocator

Freeing unused memory is a major issue, causing unwanted GC delays in some languages, use-after-free vulnerabilities in others, and Rust has significant complexity to try to fix the issue. Many ...
3
votes
1answer
124 views

T-SQL Development debate, which is the correct approach

The company I work at uses stored procedures (and a home-grown ORM) exclusively for all database interaction, selects, updates, deletes. We have numerous procs that will insert and/or update and/or ...
1
vote
1answer
322 views

Batch Rollback best practice

Context: We have 2 servers (internal and external) that have to hold identical data and remain in sync the entire time. Our internal system is like a local cache and we allow read/writes to the data ...
0
votes
2answers
372 views

When is a batch REST transaction better than lots of individual transactions?

We are building a REST API which creates items in a CDN. Each item takes between 5 and 7 seconds to create, and we need to create them as quickly as possible until we have about a million of them. ...
2
votes
0answers
236 views

Anemic Domain Model Developer thinking about a rich domain model

Martin Fowler talks about the Domain Model where the Business Logic Layer contains classes that contain state and behaviour. As far as I am concerned this means: 1) Controller calls a class in the ...
1
vote
1answer
15k views

How to use Try/catch and database transaction in PHP and laravel [closed]

I'm planing to use Try/Catch and Database Transaction in Laravel5 and my own PHP project to validate any errors occurs then rollback avoiding lost my transaction or information during user do their ...
3
votes
1answer
381 views

More scalable alternative to a transaction-per.request in a SQL+REST stack?

I'm new in web programming with SQL database. So please forgive my ignorance. I'm using some modern framework to make a REST server with a SQL database. I'm using transaction only when I think I need ...
1
vote
4answers
485 views

How to deal with long running transactions?

I'm developing a Content Management System (CMS) and I would like to include a "Save Changes" button. I mean: a user performs several changes in the database, but those changes are still not available....
1
vote
0answers
213 views

How to implement partial normalization while keeping data integrity across documents

I've been researching how to properly design a mongo schema and came across this blog post on their site: http://blog.mongodb.org/post/87892923503/6-rules-of-thumb-for-mongodb-schema-design-part-2 ...
3
votes
1answer
211 views

How do SQL transactions return immediate results?

I am using transactions to do bulk insert/updates. This is my little test loop: $now = date('Y-m-d H:i:s'); for ($i=0; $i<60; $i++) { $db->insert($cfg['ps_manufacturer'], array( '...
2
votes
2answers
3k views

Distributed transactions with Kafka

I need to implement a transaction that spans over loosely coupled (SOA+MOM) components. When a particular event is received, FOO and BAR need to do a transactional operation: that is, both the ...
9
votes
7answers
844 views

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 ...
0
votes
0answers
55 views

Resource manager for restful service

I was just brought onto a project with a service oriented architecture. There is a central WCF "profile service" that all projects call to get information on users etc. That central profile service ...
2
votes
2answers
388 views

What is a transaction?

When reading Spring tutorials I'm quite often coming across the @Transactional annotation. When I google it, I get documentation that says things like: Comprehensive transaction support is among ...
1
vote
1answer
320 views

How do workflow tools (jBPM) keep transactional state consistent?

I'm looking at jBPM specifically, but I think this applies with other systems too. As I understand it.. When placing an item into a workflow, one does not generally put a reference to that item, one ...
0
votes
1answer
4k views

What is the usefulness of transactions in a batch (especially a Spring batch)?

I understand what a transaction is in a web application, where you have some groups of database interactions which have to fail or succeed together so the database is always in coherent state. But ...
2
votes
1answer
975 views

Transactions and subresources with JAX-RS

I'm porting an existing application RESTful API to a Java web framework -- I don't actually care which -- but it's proving hard to get the basics right. The core of the problem appears to be getting ...
0
votes
2answers
2k views

Scaling locks in high concurrency web apps [closed]

Our web application has a certain resource type that is shared accross multiple users, and may thus be read and written by anyone at anytime. We resorted to the usual suspects, database transactions ...
1
vote
0answers
610 views

Transaction Management in Hibernate with DAO Design Pattern

I have many Tables, For every Table,we have DAO Interface and DAOImplementation class. Example DAO Interface public interface CancelPolicyDAO { public CancelPolicy insertCancelPolicy(CancelPolicy ...
4
votes
2answers
1k views

Simple and Composite transactional services: Question about separation of concerns and transactions

I believe I know the answer to this but I'm looking for any holes or anything I may be missing. This is focused on Spring and Java but could really apply to any programming stack. Anyway, we have a ...
3
votes
2answers
2k views

Alternative locking strategies

I'm having a problem with the design of my application, that neither optimistic nor pessimistic locking tends to solve. Here is a simplified/altered version of the problem that describes the situation....
3
votes
2answers
465 views

Simultaneous purchase in online shop bypassing limited offer

Our client sells several products in an online shop (our software) for a especially low price on the first purchase. Further purchases of each product will fallback to the regular price. E.g. product ...