Stupid little websites

.

.

best thread ever

Should we talk about our websites?

I’ll raise by three dots

I’ll raise by three dots

My dev blog:

http://kizu514.com/blog/

My wife’s Japanese comic about our family:

http://manga.shiekasai.com/

Conner_Bw: That deadlock chapter in your blog I find very interesting. Though isn’t it avoidable, e.g. if you using a simple numeric index always (like lot of ORMs require)? Did you check laravel/eloquent once, it’s very sexy, and looks similar to your opulence, only much more capable I would guess (never used opulence).

Conner_Bw: That deadlock chapter in your blog I find very interesting. Though isn’t it avoidable, e.g. if you using a simple numeric index always (like lot of ORMs require)? Did you check laravel/eloquent once, it’s very sexy, and looks similar to your opulence, only much more capable I would guess (never used opulence).

I don’t think so. The problem is concurrent additions/subtractions on the same element where you want to preserve the “truthiness” of that operation. Like, 100 people doing -1 on a single DB item at the same time. Whether or not that operation has a numeric index doesn’t affect the transaction IMHO. More info:

+https://www.reddit.com/r/PHP/comments/6586kl/using_mysql_deadlocks_to_avoid_overselling/

:slight_smile:

My t-shirt site: robbieshirts.com

Conner bw FYI eloquent provides such retry mechanism ootb: https://laravel.com/docs/5.4/database#database-transactions

Not sure why I shouldn’t use an orm nowadays, except it was not possible. I would assume that an orm will handle lot of locking mechanism automatically. For your example, a transaction will guarantee data integrity, but in eloquent, it would turn into a 4 liner maybe :slight_smile:

Conner bw FYI eloquent provides such retry mechanism ootb: https://laravel.com/docs/5.4/database#database-transactions

Not sure why I shouldn’t use an orm nowadays, except it was not possible. I would assume that an orm will handle lot of locking mechanism automatically. For your example, a transaction will guarantee data integrity, but in eloquent, it would turn into a 4 liner maybe :slight_smile:

“Handling Deadlocks…” well there ya go! :slight_smile:

Added a comment in the blog linking it. There’s no such mechanism in Doctrine, Propel, (ie Symfony) Opulence or Cake orms FYI and the feature didn’t exist in Eloquent until recently.

Good times.

Not sure why I shouldn’t use an orm nowadays

Because sometimes you have to read the underlying code to submit bug reports?

https://github.com/laravel/framework/issues/19752

:wink: