简体   繁体   中英

Laravel's Concurrency Control

I am designing a ticket purchase system using Laravel, and I was wondering how Laravel resolves concurrency - if at all (or is it all done in database?). Can concurrent transactions occur, and how does Laravel know they are taking place? I was looking at using this plugin called Attendize and using the plugin, I want to efficiently handle concurrent transactions. Any ideas?

Databases provide support for transactions, which are groups of one or more queries that are grouped together in an "all-or-nothing" atomic operation.

What actually goes into a transaction must be defined by the application developer - the database does not know or care about your business domain.

I would expect that the developers of Attendize have encoded business rules relevant to ticket sales into their plugin (like making sure a rush of users cannot buy more tickets than are available due to synchronization failure).

可以使用队列解决并发问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM