↓ Skip to main content

Data-Engineering

Kafka vs RabbitMQ vs SQS vs PostgreSQL vs Redis

Kafka vs RabbitMQ vs SQS vs PostgreSQL vs Redis

One PostgreSQL database on a laptop takes about 23,000 New York taxi trips a second, sent one at a time, while the city’s yellow taxis averaged about 1.3 trips a second in 2024. In this chapter, we compare Kafka with RabbitMQ, Amazon SQS, Redis, and PostgreSQL, and see how Kafka works: its topics, partitions, offsets, consumer groups, batches, and segments. We also see how a crash can lose or repeat events, and how a team chooses between the five.
Spark vs Hadoop vs DuckDB vs Polars

Spark vs Hadoop vs DuckDB vs Polars

One SQL query on 41 million New York taxi trips in an Iceberg table takes 0.29 s with DuckDB, 0.51 s with Polars, and 5.66 s with Spark, all on one laptop. In this chapter, we see how DuckDB and Polars use every core of one machine, how the Google File System, MapReduce, and Hadoop store and process data on many machines, and how Spark works: its cache and lineage, the driver and executors, the query plan, tasks, stages, and shuffles. We also see when one machine is enough and when Spark is worth its costs.
Apache Iceberg Beneath the Surface

Apache Iceberg Beneath the Surface

A folder of Parquet files is not a table. An interrupted write leaves a third of a month behind, two files with a different timestamp unit break the read, and a count that runs during a rewrite returns 82 million taxi trips instead of 41. In this chapter, we see how Apache Iceberg turns the same files into a table with ACID guarantees: manifests, manifest lists, metadata files, and a catalog, then hidden partitioning, atomic commits, time travel, schema evolution, and compaction, measured on New York’s taxi trips with PyIceberg, Polars, and DuckDB. We also compare Iceberg with Hive tables and Delta Lake.
Why Parquet Dominates Modern Data Engineering

Why Parquet Dominates Modern Data Engineering

Changing one line from CSV to Parquet makes reading the fares of ten million New York taxi trips 27 times faster, and the file is a sixth of the size. In this chapter, we measure why with Polars, DuckDB, PyArrow, and pandas: columnar storage, types in the file, the footer, encodings, pages, compression, predicate pushdown, and row group size. We also see where row storage still wins.