Tagged articles
5 articles
Page 1 of 1
Bin's Tech Cabin
Bin's Tech Cabin
Mar 28, 2024 · Backend Development

Why MappedByteBuffer Beats FileChannel (And When It Doesn’t) – Deep Linux Kernel Insights

This article examines the internal read/write mechanisms of Java's FileChannel and MappedByteBuffer on Linux kernel 5.4, compares their performance through detailed source analysis and benchmarks, and explains why MappedByteBuffer often outperforms FileChannel for small I/O but can be overtaken for larger transfers due to page‑fault and dirty‑page handling.

FileChannelLinux kernelMappedByteBuffer
0 likes · 28 min read
Why MappedByteBuffer Beats FileChannel (And When It Doesn’t) – Deep Linux Kernel Insights
Architect's Guide
Architect's Guide
Nov 6, 2022 · Backend Development

Zero‑Copy Techniques in Java: Buffers, MappedByteBuffer, Sendfile, and Netty

This article explains the concept of zero‑copy, how it eliminates redundant data copying in I/O operations, and demonstrates its implementation in Java through buffers, mmap+write, Sendfile, MappedByteBuffer, DirectByteBuffer, channel‑to‑channel transfers, and Netty’s composite buffers.

FileChannelJava NIOMappedByteBuffer
0 likes · 12 min read
Zero‑Copy Techniques in Java: Buffers, MappedByteBuffer, Sendfile, and Netty
Architect
Architect
Sep 13, 2022 · Backend Development

Understanding Zero‑Copy in Java I/O, NIO, Netty and Messaging Systems

This article explains the concept of zero‑copy, its benefits for I/O performance, and how Java NIO, Netty, Kafka, RocketMQ and related APIs such as mmap+write and sendfile implement zero‑copy to avoid unnecessary data copying between kernel and user space.

I/O performanceJava NIOMappedByteBuffer
0 likes · 13 min read
Understanding Zero‑Copy in Java I/O, NIO, Netty and Messaging Systems
Architect's Tech Stack
Architect's Tech Stack
Jan 19, 2022 · Backend Development

Implementing Chunked and Resumable File Upload with Fast Upload (秒传) in Java

This article explains how to implement fast (MD5‑based) upload, chunked upload, and resumable (break‑point) upload for large files in Java, detailing the Redis‑based status tracking, server‑side file handling with RandomAccessFile or MappedByteBuffer, and the required front‑end and back‑end coordination.

BackendMappedByteBufferRandomAccessFile
0 likes · 13 min read
Implementing Chunked and Resumable File Upload with Fast Upload (秒传) in Java
Java Architect Essentials
Java Architect Essentials
Jan 1, 2022 · Backend Development

Mastering Large File Uploads: Instant, Chunked, and Resumable Strategies in Java

This article explains why simple byte‑stream uploads fail for large files and introduces three robust solutions—instant (hash‑based) upload, chunked (slice) upload, and resumable upload—detailing their core logic, Redis tracking, and Java implementations using RandomAccessFile and MappedByteBuffer, plus practical code snippets.

MappedByteBufferRandomAccessFilechunked upload
0 likes · 13 min read
Mastering Large File Uploads: Instant, Chunked, and Resumable Strategies in Java