Quantcast
Channel: Moving Transaction Logic to Middle Layer: Pros and Cons - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 2

Moving Transaction Logic to Middle Layer: Pros and Cons

$
0
0

We have an event booking system that allows patrons to add themselves to a waiting list if an event is fully booked. When somebody cancels, the system moves the first person from the waitlist into a booked status. Currently, this is implemented as a stored procedure that locks the table to avoid someone slipping out of order. However, the business logic that checks event eligibility and promotion rules has grown complicated, and the stored procedure is challenging to maintain and test.

I am considering moving all the logic into the middle layer, but this would mean that the lock would need to be implemented outside of the database. Is this a bad idea? I think having a special worker that processes all booking requests would be a simpler solution that scales better as the number of events and patrons grows.

If I go this route, what managed services in AWS should I look at?

Thanks!


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images