Tagged articles
9 articles
Page 1 of 1
Bin's Tech Cabin
Bin's Tech Cabin
Aug 20, 2024 · Backend Development

How Netty’s ByteBuf Reference Counting Evolved: From Simple Counters to Parity‑Based Concurrency Safety

This article examines Netty 4.1.x’s ByteBuf reference‑counting mechanism, explains why reference counting was introduced, traces its original design, shows instruction‑level optimizations, reveals concurrency bugs in version 4.1.17, and details the clever even‑odd redesign that guarantees thread‑safe memory release while preserving high performance.

ByteBufNettyconcurrency
0 likes · 34 min read
How Netty’s ByteBuf Reference Counting Evolved: From Simple Counters to Parity‑Based Concurrency Safety
Bin's Tech Cabin
Bin's Tech Cabin
Aug 11, 2022 · Backend Development

Unlocking Netty’s ByteBuf: A Deep Dive into Java NIO Buffers and Byte Order

This article explores Netty’s low‑level data container ByteBuf by examining Java NIO Buffer design, its core attributes, view mechanisms, heap and direct implementations, byte‑order handling, and how to read and write primitive types, providing a comprehensive foundation for high‑performance network programming.

Byte OrderByteBufHeapByteBuffer
0 likes · 54 min read
Unlocking Netty’s ByteBuf: A Deep Dive into Java NIO Buffers and Byte Order
Xiaokun's Architecture Exploration Notes
Xiaokun's Architecture Exploration Notes
Apr 16, 2020 · Backend Development

Unlock Netty’s Core: Deep Dive into ServerBootstrap, EventLoop, and ByteBuf

This article provides a comprehensive walkthrough of Netty’s core components—including ServerBootstrap, EventLoop, Channel, ChannelFuture, ChannelHandler, and ByteBuf—illustrated with a simple server example, code snippets, diagrams, and detailed explanations of threading, zero‑copy, and pipeline processing.

ByteBufEventLoopNetty
0 likes · 30 min read
Unlock Netty’s Core: Deep Dive into ServerBootstrap, EventLoop, and ByteBuf
macrozheng
macrozheng
Jan 9, 2020 · Backend Development

Unlock High‑Performance Networking: Understanding Netty’s Core Architecture

This article explains how Netty, an asynchronous event‑driven framework built on Java NIO, powers high‑throughput RPC systems by detailing its core components, data handling with ByteBuf, and practical client‑server examples, offering developers a clear roadmap for building efficient distributed services.

AsynchronousBootstrapByteBuf
0 likes · 17 min read
Unlock High‑Performance Networking: Understanding Netty’s Core Architecture
Java Backend Technology
Java Backend Technology
Aug 19, 2019 · Backend Development

Unlocking Netty’s ByteBuf: How Pooled Off‑Heap Memory Allocation Works

This article demystifies Netty’s ByteBuf pooling mechanism, explaining how off‑heap memory is allocated and managed through PooledByteBufAllocator, detailing the internal structures such as PoolThreadCache, PoolArena, PoolChunk, and Subpage, and providing code examples to illustrate allocation and release processes.

ByteBufMemory PoolingNetty
0 likes · 10 min read
Unlocking Netty’s ByteBuf: How Pooled Off‑Heap Memory Allocation Works
Qunar Tech Salon
Qunar Tech Salon
Apr 10, 2015 · Backend Development

Common Pitfalls and Solutions When Building an Asynchronous Redis Client with Netty

This article shares five practical pitfalls encountered while building a pure‑async Redis client with Netty, covering thread‑model changes, pooled ByteBuf allocation across threads, ByteBuf expansion, connection timeout handling, and flow‑control in asynchronous writes, and offers concrete code‑based solutions.

AsynchronousByteBufperformance
0 likes · 13 min read
Common Pitfalls and Solutions When Building an Asynchronous Redis Client with Netty