Model checking The Deadlock Empire

This post contains TLA+ solutions for The Deadlock Empire which is a collection of challenges where the objective is to break multithreaded programs by playing the role of a scheduler that can context switch at any time. Non atomic instructions There’s two threads executing the following code: a = a + 1; if (a == 1) { critical_section(); } Since the a increment is not atomic, conceptually, it is like setting a temporary variable to the value of a– tmp = a and then setting a to the temporary variable value incremented by 1 – a = tmp + 1....

August 15, 2024 · 27 min · poorlydefinedbehaviour

Reading list 2023

The list of things I read or watched in 2023 January Operator pattern - https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ Controllers - https://kubernetes.io/docs/concepts/architecture/controller/ Introducing Operators: Putting Operational Knowledge into Software - https://web.archive.org/web/20170129131616/https://coreos.com/blog/introducing-operators.html Best practices for building Kubernetes Operators and stateful apps - https://cloud.google.com/blog/products/containers-kubernetes/best-practices-for-building-kubernetes-operators-and-stateful-apps CNCF Operator WHITE PAPER - https://www.cncf.io/wp-content/uploads/2021/07/CNCF_Operator_WhitePaper.pdf Why do we need a Database Connection Pool? -every programmer must know - https://medium.com/javarevisited/why-do-we-need-a-database-connection-pool-every-programmer-must-know-9f90e7c8e5af Difference in String pool between Java 6 and 7? Answer - https://javarevisited.blogspot.com/2016/07/difference-in-string-pool-between-java6-java7.html A deep dive into Kubernetes controllers - https://docs....

January 1, 2024 · 60 min · poorlydefinedbehaviour

Reading list December 2023

The list of things I read or watched this month Design a Metrics Aggregation System | Time Series Database Design | Prometheus - https://www.youtube.com/watch?v=SCmN2Sr7fqE&list=PL4kInuyvT-Aw_Bz7l33AwTHXDgD3s0nkv&index=3 How I add millions of rows to MySQL (for performance testing) - https://www.youtube.com/watch?v=ywp9Z0xZPzo The Story of Grafana | Episode 1: Democratize Metrics | Grafana Documentary - https://www.youtube.com/watch?v=k3RQVyeYdO8 How to (and how not to) design REST APIs - https://www.youtube.com/watch?v=60F8rzP5nQo How I read a research paper - https://muratbuffalo.blogspot.com/2013/07/how-i-read-research-paper.html Why is Jepsen Written in Clojure?...

December 31, 2023 · 5 min · poorlydefinedbehaviour

Disagree and commit falls apart in the presence of power imbalance

Disagree and commit is a management principle which states that individuals are allowed to disagree while a decision is being made, but that once a decision has been made, everybody must commit to it1. Sounds good in theory. I can see it working If the individuals involved are at the same level in the hierarchy or the individual disagreeing and committing has more power than the individual proposing an idea....

December 16, 2023 · 1 min · poorlydefinedbehaviour

Reading list November 2023

The list of things I read or watched this month How To NOT Get Screwed As A Software Engineer - https://www.youtube.com/watch?v=fcfVjd_oV1I Failing Startups : Maybe I should get a job - https://www.indiehackers.com/post/failing-startups-maybe-i-should-get-a-job-653e1efd52 Cross shard transactions at 10 million requests per second - https://dropbox.tech/infrastructure/cross-shard-transactions-at-10-million-requests-per-second Let’s implement a basic hotel reservation system with 2PC using pessimistic and optimistic locks in Go - https://blog.stackademic.com/lets-implement-a-basic-hotel-reservation-system-with-2pc-using-pessimistic-and-optimistic-locks-in-581256d142e8 Postgres: PREPARE TRANSACTION - https://www.postgresql.org/docs/current/sql-prepare-transaction.html Building a Streaming Platform in Go for Postgres - https://blog....

December 1, 2023 · 5 min · poorlydefinedbehaviour