Issue #15: 10 Reads, A Handcrafted Weekly Newsletter for Humans

Hello All,
Here are 10 reads I thought were worth sharing this week. The total time to read this newsletter is 190 minutes.  This week has stories on performance cost of containerization, how Slack built a scalable service for handling user preferences, productivity, security,  shallow reading, ACID transactions, and few more.
Whether you think you can, or you think you can’t – you’re right — Henry Ford

  1. Re-architecting Slack’s Workspace Preferences: How to Move to an EAV Model to Support Scalability15 mins reads: I like reading these kind of posts which help developers learn how other companies are solving specific problems. In this post, Slack engineer talked about how they used EAV design to design better solution for build workspace preference functionality. The key points for me in this post are:
    1. Smart engineers do not come up with right solutions to their problems first time they solve them. I have worked with a similar problem and end up using EAV. For me it looked like an obvious solution. WordPress uses EAV for storing settings as well. I think as an engineer we should keep in mind that design decision that we take today will not meet requirements of the future so we should not be afraid to re-architecture part of our application. It takes time to understand the problem and come up with the right solution. Start with a simple solution that works.
    2. Caching should be done at the right level. Most of the time we either end up making it too granular or too loose. Both have their pros and cons depending on the application.
    3. Slack has more than 70,000 paid workspaces
    4. Slack uses Vitess for horizontally scaling MySQL. Vitess was built by Youtube. They later open sourced it.
  2. The Cost of Containerization for Your Scylla: 20 mins read. I have not read many posts talking about performance implications of running applications inside containers. Folks at ScyllaDB, an open source Apache Cassandra compatible NoSQL database, did a detailed analysis on how ScyllaDB performs in containers. In their analysis, they found that ScyllaDB can be 69% slower for write heavy workload in the default Docker setup as compared to ScyllaDB running natively on AWS. They then showed how one can improve the performance by using couple of Docker flags cpuset and network to reduce the performance gap to 3%. From the conclusion section of their post “Containerizing applications is not free. In particular, processes comprising the containers have to be run in Linux cgroups and the container receives a virtualized view of the network. Still, the biggest cost of running a close-to-hardware, thread-per-core application like Scylla inside a Docker container comes from the opportunity cost of having to disable most of the performance optimizations that the database employs in VM and bare-metal environments to enable it to run in potentially shared and overcommitted platforms.”
  3. How to Instantly Reframe Your Mindset And Radically Improve Your Life: 10 mins read. This post talks about the importance of growth mindset and self-talk in helping you live a successful life. I agree with author that right mindset is the needed to achieve your goals. I personally do self-talk and it helps me when I am low. The only issue that I have is with people who think growth mindset means they should grow at the expense of others. I have a growth mindset but my value system does not allow me to attain growth at the cost of breaking trust of other people and using them for my advantage. I don’t believe in the school of thought that I can only win if someone else looses.
  4. If You Want To Achieve Extreme Productivity, Don’t Be A Goldfish: 10 mins read. The author talks about three ways to get more things done
    1. Work under deadlines so that you end up finishing task you undertake.
    2. Work on essential tasks only. Say no to things that don’t go with your core values.
    3. Look for opportunities in obstacles
  5. 3 Ways to Detect Slow Queries in PostgreSQL: 10 mins read. This post talks about three ways detect slow queries. This is very useful when you are debugging performance issues. The current project that I am building uses PostgreSQL as the main datastore. I can envision myself using these to track down those slow queries. The three approaches mentioned are:
    1. Logging slow queries
    2. Logging execution plans along with queries
    3. Using pg_stat_statements extension
  6. Don’t do this in Production10 mins read. Sometimes it happens someone writes about a topic that you are also thinking about. The author touched an important topic in his post. The need for a experienced technical mentor who can guide the team to build production applications. Last few years I have seen projects fail where the team had the right intentions but lacked experience to build the production application.
  7. Just Read the Book Already: 20 mins read. In this post, Maryanne Wolf raises an important questions – Are we all becoming shallow reader? I find it hard to do deep reading and get deeper into one subject. This is the result of our overuse of digital tools. We are looking for quick gratifying experiences. Believe me, I had a hard time reading this 10 min post without getting distracted by 10 other things. I am trying to tame my mind but it is difficult. It has become part of us.
  8. John Ousterhout: My favourite sayings: 20 mins read. This post share useful lessons that software developers can learn and apply when building applications. My top 5 favourites out of his 9 sayings are:
    1. The greatest performance improvement of all is when a system goes from not-working to working
    2. Use your intuition to ask questions, not to answer them
    3. Facts precede concepts
    4. If you don’t know what the problem was, you haven’t fixed it
    5. The three most powerful words for building credibility are “I don’t know”
  9. The Minimalistic Guide to ACID Transactions: 15 mins read. This is the third post in distributed system series. This week we understand basics of ACID transactions. ACID (Atomicity, Consistency, Isolation, and Durability) refers to a set of properties that a database transaction should guarantee even in the event of errors, power failure, etc.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: