Categories
Interesting Laravel

Understanding lockForUpdate and sharedLock in Laravel

By Alex Renoki

Another source: https://laravel-news.com/managing-data-races-with-pessimistic-locking-in-laravel

Transactional databases are fast and reliable, but not all the time. When you want to have high transaction numbers, you sacrifice something important for speed. That something important is atomicity. And here’s a real-world example that’s way more straightforward than a game — a banking system.

Let’s consider we have a very poor banking system in the pre-crypto era where our customers can easily transact between them. We are not really experienced with ledgers, so we choose to go with MySQL or Postgres (yes, even Postgres might go back if we don’t use locking).

Categories
Interesting

Harvard CS50’s Artificial Intelligence with Python – Full University Course

https://www.youtube.com/watch?v=5NgNicANyqM&t=7s

Categories
Interesting

Algorithmic “filter bubbles”