Reddit Programming
210 subscribers
1.22K photos
124K links
I will send you newest post from subreddit /r/programming
Download Telegram
Four years, Five failures, One compiler
https://www.reddit.com/r/programming/comments/1nyjblp/four_years_five_failures_one_compiler/

<!-- SC_OFF -->spent 4 years trying to build a compiler for a game engine. failed 5 times. finally got one that works. wrote about the whole thing <!-- SC_ON --> submitted by /u/Commission-Either (https://www.reddit.com/user/Commission-Either)
[link] (https://daymare.net/blogs/four-years-five-failures-one-compiler/) [comments] (https://www.reddit.com/r/programming/comments/1nyjblp/four_years_five_failures_one_compiler/)
Thundering Herd Problem (Cache Stampede): Solutions & Prevention | System Design Tutorial
https://www.reddit.com/r/programming/comments/1nyntqw/thundering_herd_problem_cache_stampede_solutions/

<!-- SC_OFF -->We'll dive deep into proven solutions to prevent cache stampede including cache locking mechanisms, probabilistic early expiration, asynchronous cache refresh strategies, and request coalescing patterns. You'll learn the difference between thundering herd and dog-piling, understand how to implement mutex locks to serialize cache updates, and discover advanced techniques like staggered TTL expiration and background cache warming. This system design interview tutorial covers real-world scenarios, best practices for distributed caching systems using Redis and Memcached, and practical code examples to help you prevent cache stampede problems in production environments. <!-- SC_ON --> submitted by /u/Extra_Ear_10 (https://www.reddit.com/user/Extra_Ear_10)
[link] (http://howtech.substack.com/p/thundering-herd-problem-cache-stampede) [comments] (https://www.reddit.com/r/programming/comments/1nyntqw/thundering_herd_problem_cache_stampede_solutions/)
A Primer on Memory Consistency and Cache Coherence, Second Edition
https://www.reddit.com/r/programming/comments/1nyul98/a_primer_on_memory_consistency_and_cache/

<!-- SC_OFF -->I've been trying to learn about different memory consistency models more rigorously and found this book to be a nice introduction so far (I'm only on the fourth chapter, though). As an aside, I've been happy to see that a lot of my intuition regarding mathematical formulations of database concurrency has carried over to make this an easier read than it would otherwise be. The parts I've read have only covered the "simpler" case of sequential consistency though, maybe my feelings will change when I learn about more complex memory models. <!-- SC_ON --> submitted by /u/SereneCalathea (https://www.reddit.com/user/SereneCalathea)
[link] (https://link.springer.com/book/10.1007/978-3-031-01764-3) [comments] (https://www.reddit.com/r/programming/comments/1nyul98/a_primer_on_memory_consistency_and_cache/)