Tagged articles
priority queue
32 articles · Page 1 of 1

Niu LiuSep 21, 2026 · Backend Development
The article analyzes priority messaging in message middleware, comparing implementations across RocketMQ, RabbitMQ, Kafka, and Pulsar, and details techniques like weighted round-robin scheduling, resource reservation, and wait aging to ensure urgent tasks get priority without starving ordinary tasks, including practical code patterns for fair task scheduling.
KafkaPulsarRabbitMQ
0 likes · 10 min read

This article demonstrates how to design and implement a miniature yet fully functional industrial intelligent scheduling system in Go, leveraging a workflow engine, priority queue, saga‑based transactions with FSM state management, concurrent station execution, and write‑ahead logging for reliable, real‑time factory automation.
ConcurrencyFSMGo
0 likes · 9 min read

This article explains how River, a Go job‑queue library, implements delayed execution, priority handling, exponential‑backoff retries, batch inserts, monitoring, and best‑practice patterns, and compares it with other queue solutions to help developers build reliable, high‑performance background processing pipelines.
GoRiverbatch processing
0 likes · 14 min read

Learn how to construct a low‑latency, scalable WebSocket server in Go using fasthttp, custom read/write pumps, priority message queues, a worker‑pool, and Prometheus metrics, with full source code, detailed module explanations, and deployment instructions for real‑time high‑concurrency applications.
GoPrometheusWebSocket
0 likes · 15 min read

The article first discusses how many large companies now filter candidates by strict academic degree requirements, then presents LeetCode problem 407 (Trapping Rain Water II) and provides a detailed Dijkstra‑variant solution using a min‑heap, including full Java and C++ implementations and complexity analysis.
AlgorithmC++Java
0 likes · 10 min read

This article explains Go's heap implementation in the container/heap package, detailing the heap.Interface, core functions like Init, Push, Pop, Remove, and Fix, and demonstrates practical examples such as priority‑queue task scheduling, data‑stream merging, and real‑time calculations.
AlgorithmHeapcontainer/heap
0 likes · 10 min read

This article reproduces MySQL's official LIMIT‑optimization example, shows how adding rows changes the ORDER BY + LIMIT result, explains the hidden priority‑queue mechanism revealed by optimizer_trace, and derives the exact row‑count threshold where the behavior switches.
LIMITMySQLheap sort
0 likes · 18 min read

This article explains how to merge multiple sorted linked lists (or arrays) into a single ascending list using a min‑heap priority queue, presents two Python solutions—one converting arrays to linked lists and another operating directly on arrays—along with detailed code, example, and complexity analysis.
Algorithmk-way mergelinked list
0 likes · 9 min read

This article investigates the nondeterministic behavior of MySQL when combining ORDER BY with LIMIT, reproduces the official example, identifies a critical row count threshold where the optimizer switches to a priority‑queue (heap) sort, and explains the underlying source‑code logic and its impact on query results.
MySQLORDER BYheap sort
0 likes · 19 min read

This guide explains how to implement delayed and priority queues in RabbitMQ 3.8 using Spring Boot 2.6, covering dead‑letter exchange configuration, message expiration, priority settings, code examples for sending and consuming messages, and practical considerations such as priority limits and ordering behavior.
JavaMessage QueueRabbitMQ
0 likes · 8 min read

This tutorial explains how to create delayed and priority queues in RabbitMQ using Spring Boot, covering dead‑letter queue configuration, TTL settings, priority parameters, and provides complete Java code examples for sending and consuming prioritized messages.
JavaMessage QueueRabbitMQ
0 likes · 6 min read

This article examines the architecture of distributed databases, identifies the challenges of global sorting across shards, and presents both in‑memory and disk‑based proxy sorting solutions, detailing buffer configuration, merge‑sort and priority‑queue techniques, performance trade‑offs, and practical constraints for large‑scale queries.
Proxydistributed databasesexternal merge
0 likes · 10 min read


JD TechFeb 23, 2023 · Backend Development
This article provides an in‑depth overview of scheduled task processing, covering common business scenarios, fundamental principles, single‑machine algorithms such as min‑heap and time‑wheel, Java utilities like Timer, DelayQueue, ScheduledExecutorService, Spring Task, Quartz, and distributed approaches using Redis, Elastic‑Job, and XXL‑Job.
SpringTask Schedulingcron
0 likes · 22 min read


ITPUBFeb 21, 2023 · Databases
This article explains MySQL's file‑sort mechanism in depth, covering the sort buffer, handling of long sort keys, three sort modes, priority‑queue and read‑rnd‑buffer optimizations, internal vs. external sorting, descending sort implementation, and how to inspect details with optimizer trace.
FilesortMySQLexternal sorting
0 likes · 32 min read


ITPUBOct 12, 2022 · Databases
This article examines the challenges of sorting queries in distributed databases, outlines the limitations of in‑memory proxy sorting, and presents a step‑by‑step optimized approach that leverages per‑shard sorting, disk‑based buffering, and priority‑queue merging to reduce memory pressure and I/O overhead.
Shardingdisk bufferingpriority queue
0 likes · 12 min read

This article explains how to configure RabbitMQ queue priority, defines reusable PHP base, service, and client classes, and demonstrates running the code to send and consume prioritized messages using the PhpAmqpLib library.
Message QueuePHPRabbitMQ
0 likes · 3 min read

This article explains what a Message Queue (MQ) is, why it is used for traffic shaping, system decoupling, and asynchronous processing, reviews popular MQ products such as Kafka, ActiveMQ, RocketMQ and RabbitMQ, and details RabbitMQ's core concepts and advanced features like dead‑letter, delayed, idempotent, priority, and lazy queues.
Asynchronous ProcessingDead Letter QueueKafka
0 likes · 13 min read

This article examines client‑side performance bottlenecks caused by message overload, analyzes low‑level Windows message loops and async task queues, proposes a flexible priority‑queue scheduling framework, details its architecture, evaluation metrics, and demonstrates significant UI responsiveness improvements while outlining future enhancements.
Task Schedulingclient performancepriority queue
0 likes · 16 min read


ITPUBAug 19, 2021 · Databases
When using MySQL pagination with LIMIT together with ORDER BY, the second page can unexpectedly contain rows from the first page because MySQL 5.6's priority‑queue optimization performs an unstable heap sort, causing nondeterministic ordering for equal values and leading to duplicate results.
LIMITMySQLORDER BY
0 likes · 7 min read

To handle exploding daily traffic, the team rebuilt the messaging platform with a unified API, concurrent consumption, MongoDB storage, and a priority scheme that uses separate Kafka topics and adjustable pull ratios, while employing a state‑machine‑driven thread pool, multi‑tier delay mechanisms, and MongoDB/Redis‑based fatigue control, delivering fast, traceable, hierarchical urgent delivery with visual metrics and content safety.
Kafkadelay queuemessaging
0 likes · 5 min read

This article explains why MySQL 5.6 may return duplicate rows on the second page when using ORDER BY with LIMIT, analyzes the optimizer’s priority‑queue behavior, and provides practical solutions such as indexing, proper pagination understanding, and handling of sorting edge cases.
IndexingLIMITMySQL
0 likes · 7 min read

This article explains why combining LIMIT with ORDER BY in MySQL can cause duplicate rows on subsequent pages, analyzes the priority‑queue optimization that makes sorting unstable, and offers practical solutions such as indexing, stable ORDER BY clauses, and a deeper understanding of pagination behavior.
Database PerformanceLIMITMySQL
0 likes · 7 min read


政采云技术Jan 12, 2021 · Fundamentals
This article explains the concept of priority queues, compares various implementations including binary heaps, demonstrates insertion and deletion operations with detailed code examples from React's SchedulerMinHeap, and discusses extensions to d‑ary heaps for performance‑critical scenarios.
Reactbinary heapd-ary heap
0 likes · 15 min read

This article explains React 16’s new Fiber architecture and its cooperative scheduling algorithm, showing how large diff tasks are split into small asynchronous units using priority queues and min‑heap structures, with code examples, performance visuals, and insights into real‑time and delayed task handling.
FiberHeapReact
0 likes · 20 min read


ITPUBSep 14, 2020 · Big Data
This article explains how the ADC (Alibaba DChain Data Converger) project automatically creates large real‑time tables by letting users configure metrics on the front‑end, then generating and publishing SQL through a pipeline that leverages design patterns, priority queues, and tree‑based data structures for efficient cross‑database processing.
FlinkSQL Generationdata pipeline
0 likes · 15 min read

This article explains how the Alibaba DChain Data Converger (ADC) automatically creates wide‑table SQL for real‑time cross‑database analytics by using a pipeline architecture, priority‑queue‑driven task scheduling, and specific design patterns to handle metadata, joins, and resource management.
SQL Generationbig datapriority queue
0 likes · 13 min read

This article explains how to implement a priority queue in Python using the built‑in heapq module, demonstrates extracting smallest and largest elements from price lists, and provides a full PriorityQueue class with push, pop, and is_empty methods, illustrated with stock portfolio examples.
AlgorithmHeapqPython
0 likes · 6 min read

This article provides a thorough introduction to heap data structures, covering their definition, core operations such as insertion and deletion, heap sort implementation, and practical production use cases like priority queues, Top‑K queries, and TP99 calculation, all illustrated with Java code examples.
AlgorithmHeapJava
0 likes · 17 min read

This article explains the binary heap data structure, its array representation, heap property maintenance via maxHeapify, construction of a max‑heap, heap sort algorithm, and the implementation of a max‑priority queue in C, including full source code and theoretical analysis.
Algorithmsbinary heapdata structures
0 likes · 10 min read

This article explains the core concepts of stacks, queues, and priority queues, discusses their time complexities, and provides complete Java implementations using arrays, including methods for insertion, removal, peeking, and display, along with a circular array queue example.
JavaQueuepriority queue
0 likes · 8 min read

This article explains the concept of a priority queue, presents a interview‑style problem requiring O(log n) enqueue and dequeue operations, and shows how to implement the solution efficiently using a binary heap with detailed step‑by‑step illustrations and a complete JavaScript code example.
AlgorithmO(log n)binary heap
0 likes · 8 min read

This article explains three ways to add priority handling to Redis queues—using a single list with head insertion, employing separate high‑ and normal‑priority lists with BRPOP, and leveraging score keys with sorting—detailing their advantages, drawbacks, and practical Redis command examples.
QueueRedisdata structures
0 likes · 4 min read
