ch
Feedback
Java Express Official

Java Express Official

前往频道在 Telegram
3 581
订阅者
无数据24 小时
-37
-530
帖子存档
What does ACID mean? . . The diagram below explains what ACID means in the context of a database transaction. 🔹 Atomicity The writes in a transaction are executed all at once and cannot be broken into smaller parts. If there are faults when executing the transaction, the writes in the transaction are rolled back. So atomicity means “all or nothing”. 🔹 Consistency Unlike “consistency” in CAP theorem, which means every read receives the most recent write or an error, here consistency means preserving database invariants. Any data written by a transaction must be valid according to all defined rules and maintain the database in a good state. 🔹 Isolation When there are concurrent writes from two different transactions, the two transactions are isolated from each other. The most strict isolation is “serializability”, where each transaction acts like it is the only transaction running in the database. However, this is hard to implement in reality, so we often adopt loser isolation level. 🔹 Durability Data is persisted after a transaction is committed even in a system failure. In a distributed system, this means the data is replicated to some other nodes.

Do React ❤️ if you want more articles

photo content

Apache Kafka has become increasingly popular in recent years. It's used by companies like Netflix, LinkedIn, and Uber to handle high-volume data streams. But if you're new to Kafka, it can be a bit daunting to understand. That's why I created this handy diagram that breaks down the key concepts of Kafka in a simple and easy-to-understand way. 𝗣𝗿𝗼𝗱𝘂𝗰𝗲𝗿: A Kafka producer is an entity that publishes data to topics within the Kafka cluster. In essence, producers are the sources of data streams, which might originate from various applications, systems, or sensors. They push records into Kafka topics, and each record consists of a key, a value, and a timestamp. 𝗖𝗼𝗻𝘀𝘂𝗺𝗲𝗿: A Kafka consumer pulls data from Kafka topics to which it subscribes. Consumers process the data and often are part of a consumer group. In a group, multiple consumers can read from a topic in parallel, with each consumer responsible for reading from certain partitions, ensuring efficient data processing. 𝗧𝗼𝗽𝗶𝗰: A topic is a category or feed name to which records are published. Topics in Kafka are multi-subscriber; they can be consumed by multiple consumers and consumer groups. Topics are divided into partitions to allow for data scalability and parallel processing. 𝗣𝗮𝗿𝘁𝗶𝘁𝗶𝗼𝗻: A topic can be divided into partitions, which are essentially subsets of a topic's data. Each partition is an ordered, immutable sequence of records that is continually appended to. Partitions allow topics to be parallelized by splitting the data across multiple brokers. 𝗕𝗿𝗼𝗸𝗲𝗿: A broker is a single Kafka server that forms part of the Kafka cluster. Brokers are responsible for maintaining the published data. Each broker may have zero or more partitions per topic and can handle data for multiple topics. 𝗖𝗹𝘂𝘀𝘁𝗲𝗿: A Kafka cluster comprises one or more brokers. The cluster is the physical grouping of one or more brokers that work together to provide scalability, fault tolerance, and load balancing. The Kafka cluster manages the persistence and replication of message data. 𝗥𝗲𝗽𝗹𝗶𝗰𝗮: A replica is a copy of a partition. Kafka replicates partitions across multiple brokers to ensure data is not lost if a broker fails. Replicas are classified as either leader replicas or follower replicas. 𝗟𝗲𝗮𝗱𝗲𝗿 𝗥𝗲𝗽𝗹𝗶𝗰𝗮: For each partition, one broker is designated as the leader. The leader replica handles all read and write requests for the partition. Other replicas simply copy the data from the leader. 𝗙𝗼𝗹𝗹𝗼𝘄𝗲𝗿 𝗥𝗲𝗽𝗹𝗶𝗰𝗮: Follower replicas are copies of the leader replica for a partition. They replicate the leader's log and do not serve client requests. Instead, their purpose is to provide redundancy and to take over as the leader if the current leader fails.

Do React ❤️ if you want more articles

photo content

photo content

photo content

photo content

photo content

photo content

photo content

photo content

photo content

photo content

photo content

photo content

Do React ❤️ if you want more interview guide notes

p_1705168835.pdf1.53 KB

Do React ❤️ if you want more Handwritten notes.