balalaika IT
37 subscribers
1 photo
13 links
Curated IT newsletter. From Russia with love.
Download Telegram
to view and join the conversation
Channel created
Channel photo updated
Extremely excited to announce my collaboration with
@puzpuzpuz
and a beloved child of our union - a bi-weekly newsletter about web development!
Stay tuned, the first issue is coming!
http://balalaikait.com/
Curated IT newsletter for web developers from web developers. We love JavaScript (Node.js, React - you name it), Java, databases and systems architecture. Delivered twice a month on Saturdays. Created in the cold and cruel motherland of balalaikas, bears and hackers - Russia.
Issue 1

# Frontend

* Have you ever doubted CSS-in-JS? I was a huge antagonist myself until I heard this Max Stoiber's talk.

* Deep dive into React concurrent mode. Get ready for the future!

* "Using React ref and really understanding it are two different pair of shoes" - do you agree? Robin Wieruch explains it in details.

# Node.js

* Node.js v13.10.0 introduced a built-in CLS API, namely, new class AsyncLocalStorage located in the well-known experimental async_hooks module. In this short post you will get familiar with AsyncLocalStorage and its capabilities.

* Worker Threads are gaining a lot of interest from Node.js community nowadays. If you want to learn more low-level details of their implementation, you should read this post.

* Ryan Dahl thinks Deno is mature enough to release 1.0. Check it out yourself.

# Java

* This article will help you to gain a deep knowledge on how much memory does a Java object take.

* If you rely on ScheduledThreadPoolExecutor class to execute periodical tasks in a precise time fashion, you might want to read this blog post.

# General

* Andy Pavlo gives us a mind-blowing overview of database internals in his series of lectures "Advanced Database Systems". Ever wondered how your favorite tweets are stored? How challenging is it to implement a database at scale? Here is your answer.

* Delta-delta encoding, Simple-8b, XOR-based compression, and more - These algorithms aren't magic, but combined they can save over 90% of storage costs and speed up queries. Here’s how they work.
Issue #2

# Frontend

- Mark Erikson (Redux maintaiiner) provides us with "details on how React rendering behaves, and how use of Context and React-Redux affect rendering". Must-read for every React dev!
- Facebook has finally released its own state management library. It's still experimental, but it's definitely worth a try. Given that it comes from the same company, it's reasonable to expect that it plays nice with the upcoming concurrent mode, suspense, and anything else we don't know of yet.
- A great read from Harry Roberts on how to make your font render faster than ever.

# Node.js

- In our view, it's the most comprehensive yet not bloated guide on how the event loop works. An absolute must-read for every Node.js developer!
- Have you ever wondered how V8 manages its memory? Here is a concise overview with great visuals.

# General

- A long-read coming in 9 parts on what every programmer should know about the memory. It is 13 years old, but it is as relevant today as it was back then.
- Async context propagation is a pain in the ass in any eco-system. Google provided us with an outstanding comparison of how different languages and frameworks approach it.
- A new episode of a never-ending battle between Kyle Kingsbury (author of a well-known Jepsen) and MongoDB. He evaluated MongoDB version 4.2.6, and found that even at the strongest levels of read and write concern, it failed to preserve snapshot isolation. MongoDB promises a patch in 4.2.8.
- Everybody knows B-trees, right? But what about other ways to speed up your search? Marko Kevac from Badoo speaks about their usage of bitmap indexes.

# Bonus

- Did you know that it's simple enough to build a time series storage on top of RocksDB which is capable of writing 400K data points/sec on decent HW? And yes, it uses bitmaps. Andrey P, who is a big fan of time series (and bitmaps), recently did a talk on the topic.
Issue #3

# Frontend

- TJ VanToll watched all 27 React Europe talks and provided us with his notes.
- A good read from PayPal on how they approach sharing UI components at their enterprise level.
- A Visual Guide To React Mental Models, Part 2. This time it's useState, useEffect and lifecycles.

# Node.js

- Pointer compression is a low-level feature recently introduced in V8. Not only it saves memory, but it improves the performance (surprise!). Hopefully, it will be available in Node.js in the future.
- Did you know that there were experiments with jemalloc in Node.js core? As expected, not a silver bullet, but definitely an interesting read.

# Java

- An in-depth overview (with benchmarks!) of modern garbage collectors applied to a stream processing framework.
- While pointer compression is a recent improvement of V8, Hotspot JVM had compressed oops for ages.

# General

- Your ultimate guide on learning how to design large-scale systems and prep for the system design interview.
- Joshua Thijssen describes ALL AWS services in one sentence each.
- Most modern server machines have NUMA memory architecture, so modern software has to be NUMA-friendly. If you are not familiar with NUMA yet, check out this post.
Issue #4

# Frontend

- An in-depth guide on building your own 100% reactive renderer from scratch.
- A must-read research on CPU cost of JavaScript.
- Bootstrap 5 alpha is out! This time no jQuery and no IE11.
- A guided tour of what it is like to work on the SpiderMonkey (JavaScript engine) compiler and improve conformance with ECMA-262, the JavaScript Specification. From Mozilla to people with love.

# Node.js

- Sad to say it, but it looks like hapi.js project is reaching its end. If you happen to use hapi.js, you should consider switching to another web framework in the nearest future.
- As of v7 npm support both yarn.lock and package-lock.json. Here is a great read on npm v7 treats them and about the future of npm dependency resolution algorithms.

# Java

- HotSpot JVM has tons of optimizations all over the place. For instance, even the default hashCode() hides some secrets. Learn more about this optimization here.
- As an interesting follow-up, you might want to take a look at the j.l.String#hashCode() implementation which caches the hash code in a non-volatile hash field. This optimization was described in the Java Concurrency in Practice book here and here. Do not do it at home!
- If you are not familiar with the history behind Generics, which have a controversial reputation in Java community, you should read this post from Brian Goetz.

# General

- Jepsen team recently did an analysis of RedisRaft, a new module that provides strict serializability for Redis. As usual, some issues were found. As usual, some promises of fixes were made.
Issue #5

# Frontend

- Does CSS grid seem kind of complicated to you? Do you find yourself constantly fighting it, endlessly browsing web for yet another hack? Here is a remarkable cheatsheet destined to keep your sanity.
- An outstanding overview of scrolling technologies and approaches by Zach Saucier.
- Security is something frontend engineers are often not thinking about. It seems like a task for the backend team. What possibly could go wrong on the frontend? Here is a lengthy list every React developer should keep in mind.

# Node.js

- The TSC is going to have "Next 10 years of Node.js" session on July 16. Here you can find the agenda.
- What exciting things happened in the JavaScript language and the V8 engine in 2019? Shu and Leszek take a tour of some new features and improvements.

# Java

- What may be simpler than measuring time, right? In reality, Java has multiple APIs to do the job and there are some important restrictions related to each one of those. Here is a great deep dive on the topic.
- Have you ever asked yourself a question of whether the allocation of Java objects on the heap involves any contention? By all means, it should, as multiple threads have to be coordinated during those allocations. Yet, HotSpot JVM has another tricky optimization, called Thread-Local Allocation Buffers which allows avoiding contention in most scenarios. If you want to learn more, here is an extensive read.

# General

- At first glance, load balancing seems to be simple as a concept. In fact, it is extremely hard to make it right. Guys from DataStax recently implemented the Power of Two Random Choices algorithm for Apache Cassandra. It showed a sizeable improvement in high load scenarios. Learn more here.
- The story of the Slack downtime on May 12th, 2020.
- ARM is conquering the world. Soon you will find it in servers, supercomputers, and even your MacBook!
Issue #6

# Frontend

- A comprehensive guide on testing in React from Johannes Kettmann. A single long-read that covers it all.
- Did you ever hear of CSS Houdini? Lisi Linhart did not just hear about it, but went above and beyond and wrote a great piece on its performance.
- Adobe open-sourced its own design system and state management library for React!

# Node.js

- Moment.js, Luxon or date-fns? Hopefully, one day there will be a built-in API that if not removes but at least reduces the need for third-party libraries to manipulate date and time. Here is a TC39 proposal for the new Temporal API that is destined to fix JS Date.
- Nowadays almost every Node.js developer has a good understanding of the event loop principles. Yet, only some folks understand how node works from the low-level perspective. If you want to learn more about non-blocking I/O, watch this interesting talk by Sam Roberts.

# Java

- Some of java.util.concurrent.atomic classes expose #lazySet() methods which may be a significant performance win for a single writer scenario in the concurrent mode. If you are not familiar with those methods and want to understand how they differ from ordinary volatile writes take a look at this post and this one as well.
- Everyone knows Netty, which is used as a building block in many other frameworks. On of the main reasons behind that popularity is performance. Watch this talk to learn about some optimizations inside Netty, including the "do not try this at home" ones.

# General

- Linux kernel scheduler has to make a lot of decisions and it has to make them fast. Here is a detailed explanation of how the scheduler works.
- Writing correct concurrent code is hard, no doubts. Writing performant concurrent code is even harder. If you aim for both of these goals, read this awesome blog post that compares the costs of different concurrent primitives.
Channel photo updated
Issue #7

# Frontend

- A short, yet insightful post about enhanced A11Y at Facebook. You might think it is easy and not a big deal until you have to re-write your whole application to meet the AIRA guidelines.

# Node.js

- What do you know about the speculative compilation in JavaScript? This lengthy read goes in-depth of how modern JS VMs make your code run faster.
- There is a certain learning curve related with contributions to the native side of Node.js core. Luckily this great tips and tricks post from Joyee Cheung is there to help you.

# Java

- It is not a big secret that GC may introduce latency spikes. Such spikes are especially harmful in case of stream processing engine, like Hazelcast Jet or Apache Spark Streaming. Read this blog post series from Jet team to see results of various experiments with modern Java garbage collectors.
- Did you know that there is a Java Engineering Group in Microsoft? Moreover, these guys wrote a nice JEP on Stack Allocation support in HotSpot C2 to eliminate non-escaping heap allocations where applicable.

# General

- Distributed systems are much more than the AP/CP choice implied by the so called CAP theorem. Conflict-free replicated data types (CRDT) assume eventual consistency, scale really well, and provide math-based way to resolve inconsistencies between replicas. In this talk Martin Kleppmann goes beyond the introductory material on CRDTs.
- API seems to be so natural term that we assume it was there since the beginning of computer era. But that is not true. If you want to learn when and how the concept of API was invented, watch this talk from Joshua Bloch.
- Dropbox migrated from Nginx to Envoy. In this blogpost Alexey Ivanov and Oleg Guba talk about the old Nginx-based traffic infrastructure, its pain points, and the benefits we gained by migrating to Envoy.
Issue #8

# General

- Databases are one of the most complex pieces of software ever made by humans, not only in terms of their internals, but also in terms of the behavior for the end-users. This comprehensive blog post might help you to avoid common pitfalls when dealing with DBs.
- Designing a successful language is very hard, no doubts. If you are interested in the topic, watch this talk by Brian Kernighan.
- Nowadays application development assumes dealing with distributed systems of various kinds. If you feel that you are at the beginner level in the wild ocean of distributed systems, you should watch this nice overview talk.

# Java

- Were you capable to catch up with all the new stuff introduced in Java 9, 10, 11, 12, 13, and beyond? If not, here is a busy developers’ guide from Grzegorz Piwowarek.

# JavaScript

- On August 20, Microsoft announced a new major version of TypeScript - 4.0. It packs lots of goodies. This lengthy post goes over them one by one and it is an absolute must-read for every TS developer.

# React

- TypeScript is the official language of frontend web development at Airbnb. Yet, the process of adopting TypeScript and migrating a mature codebase containing thousands of JavaScript files didn’t happen in one day. In this article Sergii Rudenko tells us about their TypeScript migration strategy and tools.
- On August 10, React published their first release candidate for React v17. Even though it’s almost three years since a major release of React, surprisingly, there are no new features added for the new version. This concise read covers the major updates.

# Node.js

- Node.js Technical Steering Committee is currently running a survey on unhandled Promise rejections handling. You have a chance to a part and impact the final decision. Here is the blog post which explains the rationale behind the survey.
Issue 9

# General

- CPU caching 101 from Nick Evanson. A concise read about the fundamentals to get you started on how it works and why we need it.
- Over the last two years, Uber has attempted to reduce microservice complexity while still maintaining the benefits of a microservice architecture. With this blog post we hope to introduce our generalized approach to microservice architectures, which we refer to as “Domain-Oriented Microservice Architecture” (DOMA).
- Distributed locks are infamous for being hard to use right. Some time ago Hazelcast team introduced locks as a part of CP Subsystem based on Raft, a well-known consensus algorithm. This blog post describes potential pitfalls of distributed lock and how FencedLock solves them.
- Great engineers of the past have a lot to learn from. This talk explains how Erlang was designed to scale well on multicore machines.

# JavaScript

- ES6 introduced many nice built-in collections, such as Map, Set, WeakMap, and WeakSet. Unfortunately, the spec does not put many requirements for concrete implementations. If you want to learn practical details of Maps and Sets implementation in V8, read this blog post by Andrey P.
- JIT compiler is what makes V8 and other JS engines blazing fast. But exactly does it do? Watch this talk by Franziska Hinkelmann to learn the answer.

# React

- Is it possible to build SPAs purely in Rust and without writing a single line of JavaScript? The short answer is YES! Read about the experiment here.

# Node.js

- A concise guide on how to debug segmentation faults in Node.js.

# Java

- Did you know that java.security.SecureRandom may be more or less secure depending on the configuration? This blog post explains how to use it in the right way.
Issue 10

# General

- Back to basics. Do you remember how NAT traversal works? David Anderson wrote a lengthy post with great visuals to remind you.
- Steve Yegge explains why vendor locks mixed with poor backward compatibility could make anyone question the benefits of a cloud.
- CockroachDB team recently introduced Pebble, an open-source K/V store inspired by RocksDB. Read this blog post to learn why they decided to do write it.
- Here is a great series of blog posts on implementation of Linux epoll for those of you who enjoy learning about kernel.
- If you're not familiar with Log-structured merge-tree data structure (aka LSM tree), but want to learn it, Tarantool DB team did a great job on documenting their implementation.

# Java

- Java 15 is GA. It brings internal JVM changes (say, it disables biased locking), stable releases of low-latency garbage collectors (ZGC and Shenandoah), experimental APIs (such as Foreign-Memory Access API), and some more goodies.
- JNI has a fame of being "slow". But where the JNI overhead comes from and how critical it is? If you want to hear an explanation with all low-level details, here is a great talk by Cliff Click.

# JavaScript

- Moment.js team now considers the library to be a legacy project in maintenance mode. It is not dead, but it is indeed done. Read more about the reasoning here.

# React

- Animations can make a site stand out. Or, they can just as easily kill the experience. Prasanjit Singh presents us with the ground rules to master web animations.
- AVIF is a fairly new kid on the block and it promises us a new future of the leaner web with smaller images. JPEG is not dead yet, but we keep our fingers crossed. Here is a concise read from Jake Archibald on the new image format.
- Wondering how Facebook's Recoil works? Bennett Hardwick explained it for you in 100 lines of code.
Issue #11

# General

- Joseph Gentle tells us about the rise of CRDTs and why he thinks in could beat Operational Transform in many aspects.
- One who wants to write fast code has to understand weak and strong points of modern HW. Cliff Click gave a brilliant talk where he explains those points.
- Thread-Per-Core (TPC) is a valid approach for building high-performance server-side software. Yet, it is not trivial to build it right and has a lot of quirks. Some time ago, Redpanda team managed to use TCP architecture on top of Seastar framework and shared their experience.

# Java

- James Gosling recently gave a lengthy interview on Java, JVM, Emacs, and the early days of software engineering.
- Kotlin gets more and more popular among the JVM community. In this post Andrey Breslav sheds some light on the secrets of fast compilation in Kotlin.

# JavaScript

- Atomics module, which holds low-level synchronization primitives useful for Web Workers, keeps getting new features, like Atomics.waitAsync method, which is currently at TC39's stage 3. V8 team wrote this blog post to explain how Atomics can be used to write sync and async lock primitives.
- A great reminder that even high-level languages like JavaScript still suffer from memory leaks. This time the case is kind of unusual - detached windows. Be a good engineer and clean up after yourself!

# React

- Kent C. Dodds tells us about common pitfalls and myths related to useEffect.
Issue #12

This is our 12th newsletter. It means we are exploring the world of web development together for half a year. Sad to say, but there will not be any new issues of the newsletter for a long while. This is not a goodbye, rather a see you later. In the meantime, feel free to subscribe to the personal blogs of our curators: https://medium.com/@apechkurov and https://blog.goncharov.page/. Let's stay in touch!

# General

- In this post Brandon Harris shows us how to synthesize billions of rows of true time series data with an autoregressive component, and then explore it with ClickHouse, a big data scale OLAP RDBMS, all on AWS.
- DuckDB - an embeddable database for analytical workloads.
- Do you think mmap is faster than syscalls? Well, mmap could make your app run faster, but with strings attached. Sasha Fedorova gives us a great in-depth explanation of how it works.
- Distributed transactions are hard to implement right. In fact, many modern databases do not even bother with supporting them. FaunaDB is not one of those, as it builds transactions on top of Calvin algorithm.

# Java

- Tiered JIT compilation can be found in multiple modern runtimes and JVM is no difference. Some time ago Rafael Winterhalter gave a nice talk on basic principles behind C2 compiler in HotSpot.
- ForkJoinPool is available since Java 7 and used in several places within standard library, like parallel streams. It embeds many good ideas, like queue per worker and work stealing. If you are not familiar with these details, you may find them in the original paper by Doug Lea.

# JavaScript

- Monomorphism is a very important definition for JIT compilation in JavaScript (and not only - see the above Rafael Winterhalter's talk). Several years ago, Vyacheslav Egorov wrote a brilliant post to explain how V8's JIT compiler makes use of monomorphism.
- esbuild - a new kid in the family of bundlers and minifiers. Written in Go. Claims to be extremely fast.
- NPM 7 is out. Lots of new goodies. Read more about them here.