Tagged articles
streams
83 articles · Page 1 of 1

21CTOSep 20, 2026 · Backend Development
PHP 8.6 introduces StreamErrorMode, StreamError objects, and stream_last_errors() to provide typed error codes for stream operations, replacing fragile warning string parsing. It details three context options, exception and silent modes, StreamException with StreamErrorCode enum (70+ cases), handling multiple errors, new context parameters for four functions, and backward compatibility.
PHP 8.6RFCStreamError
0 likes · 13 min read

This article explains what backpressure is, why Node.js services silently run out of memory, and provides practical streaming and bounded‑concurrency patterns with code examples to keep memory usage stable under load.
Node.jsOOMbackpressure
0 likes · 10 min read

This article explains what Java lambda expressions are, why they were introduced, their syntax and classifications, functional interfaces, core functional interfaces, method references, and provides multiple code examples that progressively simplify traditional anonymous inner classes into concise lambda forms.
Functional InterfacesJavaLambda Expressions
0 likes · 15 min read

The PHP Foundation, backed by the Sovereign Tech Agency, outlines a multi‑year plan to modernise PHP’s stream subsystem with performance boosts, safer async I/O, enhanced error handling, new network polling, and TLS 1.3 security improvements, illustrated by before‑and‑after code examples.
OpenSSLPHPSecurity
0 likes · 9 min read

This article explains the powerful flatMap operator in Java streams, covering basic usage, Optional handling, replacing nested loops, API response flattening, combining with filter, reactive programming, and a comprehensive end‑to‑end example, all illustrated with Spring Boot 3 code snippets.
JavaSpring BootflatMap
0 likes · 11 min read

This comprehensive guide explains Redis Streams—its data model, entry IDs, range queries, blocking reads, consumer groups, pending message handling, trimming, persistence, and performance characteristics—providing practical commands, examples, and best‑practice tips for building reliable streaming applications.
XADDXCLAIMXREAD
0 likes · 41 min read

This article explains the fundamentals of Java I/O streams, showing how to efficiently read, write, copy, delete, move, and inspect both text and binary files using NIO, Buffered streams, and modern APIs, while providing ready‑to‑use code examples.
Binary filesDecorator PatternFile I/O
0 likes · 18 min read

This article explains why Java introduced the seemingly odd lambda syntax, shows how lambdas replace verbose anonymous inner classes for loops, grouping and collection operations, introduces functional interfaces, and provides comprehensive code examples demonstrating creation, method references, sorting, filtering, and threading with lambdas.
BackendCode ExampleFunctional Interface
0 likes · 8 min read

This article explains how to handle massive HDFS‑derived text and CSV files in Node.js by analyzing memory and CPU bottlenecks, comparing client‑side upload strategies, and presenting synchronous, callback, promise, streaming, and multithreaded worker‑thread solutions with complete code examples.
File I/OMultithreadingNode.js
0 likes · 13 min read

This article provides a comprehensive guide to Java I/O streams, covering the distinction between node (low‑level) and processing (high‑level) streams, byte versus character streams, their superclasses, common implementations, buffering techniques, object serialization, and practical code examples for reading and writing data.
ByteStreamCharacterStreamIO
0 likes · 16 min read

This article explores how Java 8 streams and lambda expressions can make code shorter and more elegant, while highlighting common mistakes such as poor formatting, oversized functions, misuse of Optional, and over‑reliance on parallel streams, and offers practical guidelines for writing readable, maintainable backend code.
BackendJavacode-quality
0 likes · 13 min read


21CTOJan 6, 2025 · Backend Development
Explore the contrast between declarative and imperative programming, dive into Java Stream fundamentals, benchmark parallel versus sequential execution, and understand the role of annotations, offering practical insights for writing cleaner, more efficient backend code.
AnnotationsJavadeclarative programming
0 likes · 9 min read

Redis Streams offer a memory‑efficient, easy‑to‑use message queue that matches many Kafka features, making it a practical alternative for projects that cannot afford the overhead of deploying a full‑blown Kafka infrastructure.
Backend DevelopmentKafka AlternativeMessage Queue
0 likes · 7 min read

This article introduces five practical Java Streams techniques—including precise filtering, map transformation, aggregation with reduce, and advanced grouping—to help developers write clearer, more efficient backend code, complete with code examples and explanations of each operation.
Javagroupingmap
0 likes · 8 min read

The article shows how using Collectors.toMap can trigger IllegalStateException for duplicate keys and NullPointerException for null values, and demonstrates proper merge functions, Optional handling, and a plain‑for‑loop alternative to safely convert a List of objects into a Map.
Collectors.toMapDuplicateKeysHashMap
0 likes · 5 min read

This article explains the MQTT protocol, demonstrates why streams are ideal for protocol implementation, and provides a complete Node.js example—including connection, subscription, publishing, heartbeat, and graceful shutdown—illustrated with clear code snippets and diagrams.
IoTMQTTprotocol
0 likes · 36 min read

Java's Arrays.asList method has three major pitfalls: it cannot directly convert primitive arrays like int[] because of autoboxing limits, it returns a fixed-size list that throws UnsupportedOperationException on modification, and the list shares its backing array so changes to the original array are reflected in the list; using Arrays.stream for boxing or wrapping the result in a new ArrayList avoids these issues.
Arrays.asListCode ExamplesJava
0 likes · 4 min read

This article introduces Redis Streams, explains its core concepts and commands, compares it with Kafka, demonstrates practical SpringBoot integration with code examples, and discusses its suitability as a lightweight message queue, highlighting advantages, limitations, and best‑practice considerations.
Kafka ComparisonSpringBootstreams
0 likes · 13 min read

This article explains Java 8's lambda expressions and functional interfaces, demonstrates common functional interfaces with code examples, and shows how to use Stream API operations such as filter, map, flatMap, collect, max/min, count, reduce, and advanced collectors for efficient backend development.
Functional InterfacesJavaJava8
0 likes · 14 min read

This article explains Java 8's lambda expressions, functional interfaces, and the Stream API, demonstrating how immutable values and functions enable concise data processing through lazy and eager evaluation, with practical code examples covering predicates, consumers, mapping, filtering, grouping, and reduction.
CollectorsFunctional InterfacesJava
0 likes · 12 min read

This article introduces Java 8's lambda expressions, functional interfaces, and the Stream API, explaining key concepts such as lazy and eager evaluation, and demonstrates common stream operations like collect, filter, map, flatMap, max/min, count, and reduce with concrete code examples.
BackendCollectorsFunctional Interfaces
0 likes · 16 min read

This guide explains Redis Pub/Sub as a communication pattern, shows what it can achieve, lists the most common commands with examples, demonstrates a multi‑client scenario, and outlines its drawbacks compared with newer Redis Streams.
BackendReal-timemessage-queue
0 likes · 5 min read

This article provides a comprehensive overview of the Java Collections Framework, explains frequent mistakes such as modifying collections during iteration or using toMap with null values, and introduces practical utility libraries like Hutool, Apache Commons Collections, and Guava to help developers write safer and more efficient code.
Apache CommonsConcurrencyGuava
0 likes · 16 min read

This article compares Java 8 Streams with traditional for‑loops through concrete code examples, benchmark results, parallel‑stream speedups, and discusses scenarios where Streams excel or fall short, helping developers decide when to prefer Streams over loops.
Code ReadabilityJavaParallelStream
0 likes · 10 min read

This article explains why using Redis List for a message queue is limited, introduces Redis Stream as a purpose‑built MQ with consumer groups, ACKs, and persistence, and dives into its internal Radix‑Tree and listpack structures, command usage, and memory‑saving techniques.
BackendListpackMessage Queue
0 likes · 14 min read

This article introduces Java I/O streams, explains how to efficiently read large files using buffered streams and NIO, details the core components of Java NIO (Channel, Buffer, Selector), and covers object serialization, the role of serialVersionUID, and alternative serialization frameworks.
IONIOSerialization
0 likes · 12 min read

This article introduces Java's three generations of IO frameworks, explains the differences between blocking BIO, NIO, and NIO2, details byte and character streams, and provides complete example programs for writing to and reading from text files using try‑with‑resources and stream conversions.
BIOFileIO
0 likes · 14 min read

This article provides a comprehensive guide to Java lambda expressions, covering their syntax, how they map to functional interfaces, differences from anonymous classes, parameter forms, method bodies, variable capture, and method references, with practical code examples for each concept.
Functional InterfaceJavaMethod Reference
0 likes · 14 min read

This article introduces Java 8's functional interfaces and lambda expressions, explains immutable values and function composition, demonstrates common stream operations such as collect, filter, map, flatMap, max/min, count, and reduce, and shows how to use advanced collectors like groupingBy, partitioningBy, and joining with practical code examples.
CollectorsFunctional InterfaceJava
0 likes · 17 min read

This article highlights six frequent Java pitfalls—including misuse of == with Integer, Objects.equals quirks, BigDecimal precision loss, Stream filter side‑effects, auto‑unboxing null errors, and String replace nuances—providing code examples and best‑practice recommendations to help developers write safer, more reliable code.
Auto-unboxingJavaString
0 likes · 12 min read


ITPUBSep 9, 2022 · Databases
While Kafka dominates large‑scale messaging, this article shows how Redis Streams—an in‑memory, low‑cost alternative—can handle peak‑shaving, buffering, decoupling, redundancy, and robustness, offering simpler commands and higher speed for projects where deploying a full Kafka stack is overkill.
Message Queuein-memory databaseredis
0 likes · 7 min read

This article explains why Java 8 Lambda‑Streams abort on exceptions, demonstrates the problem with sample code, and shows how to gracefully handle both checked and unchecked exceptions using Vavr's Try wrapper so that stream processing can continue.
Vavrexception-handlingfunctional programming
0 likes · 5 min read

This article explains six frequent Java pitfalls—including misuse of the == operator with Integer, subtle bugs in Objects.equals, precision loss with BigDecimal constructors, reference sharing in Stream.filter, NullPointerExceptions from autounboxing, and differences between replace, replaceAll, and replaceFirst—providing code examples and best‑practice recommendations.
AutoboxingJavaStringReplace
0 likes · 12 min read

This article walks Java developers through six frequent pitfalls—including misuse of the == operator, subtle bugs in Objects.equals, precision issues with BigDecimal, unexpected Stream filter behavior, autoboxing/unboxing surprises, and string replace quirks—offering clear explanations, code examples, and best‑practice solutions to help avoid costly bugs.
AutoboxingJavaString replace
0 likes · 13 min read

This article explores how to write clean, maintainable Java 8 Stream and Lambda code by emphasizing proper line breaks, function decomposition, judicious use of Optional, choosing between returning Streams or Lists, avoiding parallel streams pitfalls, and leveraging best practices to improve readability and performance.
Best PracticesCode styleJava
0 likes · 13 min read

This article provides a comprehensive guide to Java I/O, explaining the concepts of input and output streams, distinguishing byte and character streams, detailing node and processing streams, and offering practical code examples for file handling, buffering, conversion, and object serialization.
File I/OI/OSerialization
0 likes · 22 min read

This article explains how Redis can be used to build message queues by leveraging List commands with LPUSH/RPOP and BRPOPLPUSH for simple queues, the Stream data type introduced in Redis 5.0 for durable, ordered, consumer‑group‑based queues, and the Pub/Sub model for real‑time broadcasting, while also analyzing the underlying source code structures such as quicklist, radix trees, and stream internals.
Backenddata-structuresmessage-queue
0 likes · 21 min read

This article demonstrates how to retrieve flat menu data from a database into a List, then use Java 8 Stream operations and recursive methods to assemble a hierarchical tree structure, printing the result as JSON for verification.
BackendJavaTree Structure
0 likes · 4 min read

This article explains the fundamentals and internal mechanics of Node.js readable streams, covering their history, data structures like BufferList, state management, key APIs such as push, read, pipe, and how they inherit from EventEmitter to enable efficient, low‑memory data processing.
BufferListEventEmitterNode.js
0 likes · 29 min read

This article explains how to write concise, readable Java 8 Stream and Lambda code by using proper line breaks, function extraction, Optional, choosing between Stream and List returns, and avoiding parallel streams, illustrated with real code examples and refactoring guidelines.
Code styleOptionalParallel Streams
0 likes · 14 min read

This article explains how to use IntelliJ IDEA's Live Template feature to create shortcuts for common Java Stream collector operations such as toList, toSet, joining, and groupingBy, improving code readability and productivity when migrating large codebases to the Stream API.
Backend DevelopmentCollectorsIntelliJ IDEA
0 likes · 6 min read

This article explains Java 8's lambda expressions and functional interfaces, demonstrates common Stream operations such as filter, map, flatMap, collect, max/min, count and reduce, and shows how to use advanced collectors for grouping, partitioning and joining with clear code examples.
CollectorsFunctional InterfacesJava
0 likes · 12 min read

This article explains why HashMap cannot preserve entry order, introduces LinkedHashMap to maintain insertion order, and provides both classic and lambda‑based Java solutions—including detailed code snippets—to sort a Map by its values efficiently.
CollectorsJavaLinkedHashMap
0 likes · 8 min read

This article explains how to create and use IntelliJ IDEA live templates to replace repetitive Java Stream collector calls such as toList(), toSet(), and groupingBy() with concise shortcuts, improving code readability and productivity when migrating legacy code to Java 8 streams.
Backend DevelopmentIntelliJ IDEAJava
0 likes · 6 min read

This article explains the fundamentals of Node.js streams, including basic concepts, stream types, pipe and pipeline usage, handling backpressure, and demonstrates how async iterators can simplify stream processing with detailed code examples and visual animations.
Async IteratorNode.jsPipeline
0 likes · 26 min read

This article shares practical Java 8 tips, covering how to use Optional responsibly, write concise and clear lambda expressions, design functional interfaces, and leverage the Stream API with debugging tricks, while warning about common pitfalls and performance considerations.
Best PracticesJavaJava 8
0 likes · 11 min read

This article breaks down Java Stream usage by dissecting each line of a sample program, comparing it with equivalent non‑stream code, and illustrating how iterate, limit, map, filter, and reduce work together to produce the final result.
Backend DevelopmentJavafunctional programming
0 likes · 6 min read

This article explains Java 8's functional interfaces, lambda expressions, method references, lazy versus eager evaluation, and demonstrates how to use the Stream API—including collect, filter, map, flatMap, max/min, count, reduce, and various collectors—to write concise, expressive code for processing collections.
CollectorsFunctional InterfacesJava
0 likes · 15 min read

This article presents five distinct methods for eliminating duplicate elements from a Java ArrayList, including using LinkedHashSet, Java 8 streams, HashSet with order preservation, manual iteration with contains checks, and nested loops, each accompanied by complete code examples and output results.
HashSetJavaarraylist
0 likes · 6 min read

This article explains how Redis can be used as a lightweight message‑queue solution by leveraging its List, Pub/Sub, and Stream data structures, covering core commands, blocking consumption, acknowledgment mechanisms, consumer groups, and practical usage patterns for distributed systems.
Consumer GroupListMessage Queue
0 likes · 20 min read

This article introduces six Java file-writing techniques—including FileWriter, BufferedWriter, PrintWriter, FileOutputStream, BufferedOutputStream, and Files—explains their underlying stream concepts, provides code examples, and benchmarks their performance to guide developers in choosing the most efficient method for text or binary data.
BufferedWriterFile I/OFileWriter
0 likes · 16 min read

This article examines the four major HashMap traversal techniques—Iterator, for‑each loops, Lambda expressions, and Streams API—detailing seven concrete implementations, benchmarking their performance with JMH, analyzing generated bytecode, and evaluating safety when modifying collections during iteration, ultimately recommending the most efficient and secure approaches.
HashMapJavaiteration
0 likes · 19 min read

This article explains the fundamentals of Java IO, covering the definition of streams, their characteristics, classification by direction, data unit and function, the role of node and processing streams, buffering for performance, serialization, and includes extensive code examples and efficiency comparisons.
Buffered StreamsFile I/OIO
0 likes · 23 min read

Explore essential IntelliJ IDEA techniques—including string highlighting with regex validation, batch replacement via Alt+J, interactive Java Streams debugging, enhanced auto‑completion for Stream APIs, and document block rendering—to boost your Java development productivity and streamline code editing workflows.
IntelliJ IDEAJavacode editing
0 likes · 3 min read

This tutorial shows how to use Java 8 Stream API to convert a List of objects into a Map, group elements by a key, filter by condition, calculate aggregates such as sum, find max/min values, and remove duplicates, all with concise functional code.
List to Mapaggregationdeduplication
0 likes · 5 min read

This article explains how Java 8's Stream API and lambda expressions can replace verbose loops with concise, declarative operations for filtering, sorting, mapping, and grouping collections, while also covering stream creation, intermediate and terminal operations, and advanced collectors for data analysis.
Java8collectionsfunctional programming
0 likes · 13 min read

This article explains how to create and use IntelliJ IDEA live templates to replace verbose Java Stream collector calls such as collect(Collectors.toList()) with concise shortcuts like .toList, improving code readability and productivity for backend developers.
Live Templatesbackend-developmentintellij-idea
0 likes · 6 min read

This article showcases ten concise Java one‑liners that use Java 8 features such as Lambda, Stream, try‑with‑resources, and JAXB to perform common tasks like mapping, summing, filtering, file I/O, XML parsing, and parallel processing without any additional code.
JavaJava8One-liners
0 likes · 6 min read

The article discusses Java 8's Stream API limitations, especially the lack of a toList() method, and shows how IntelliJ IDEA's Live Templates can create shortcuts for common collectors, improving code readability and developer productivity.
CollectorsIntelliJJava
0 likes · 7 min read

The article compiles a comprehensive set of Java refactoring techniques—ranging from ternary operators, Optional handling, and Stream‑API transformations to Lombok annotations, generics, utility libraries, and design‑pattern applications—aimed at reducing boilerplate, improving readability, and eliminating dead code while preserving functionality and performance.
Code SimplificationJavaLombok
0 likes · 29 min read

An extensive guide to Java 8’s new capabilities, covering lambda expressions, functional interfaces, streams, default methods, Optional, CompletableFuture, the new date‑time API, concurrency enhancements, and numerous language and library improvements, with detailed explanations and code examples.
CompletableFutureConcurrencyFunctional Interfaces
0 likes · 51 min read

Redis 5.0 builds on 4.x with new Stream data type, enhanced memory management, and several command improvements—including XADD, XGROUP, XREADGROUP, XACK, and ZPOPMIN/ZPOPMAX—while also adding LFU/LRU support in RDB snapshots and client‑side enhancements for easier cluster management.
LFULRUcommands
0 likes · 9 min read

This short tutorial shows how to use Java's IntStream API to generate an ASCII heart directly in the console with a single expressive one‑line statement, complete with the full code snippet and a visual result.
ASCII artHeart ShapeJava
0 likes · 2 min read

This article demonstrates how to generate a heart-shaped pattern directly in the Java console using a compact IntStream‑based one‑liner, explaining the mathematical formula and stream operations that produce the visual output without external libraries.
ASCII artHeart ShapeIntStream
0 likes · 3 min read

This article explains Java's Comparator interface, its compare method, lambda definitions, and how to use it with Collections.sort, List.sort, Arrays.sort, Stream.sorted, as well as with SortedSet and SortedMap structures, covering static and default methods like reversed, nullsFirst, thenComparing, and more.
ComparatorJavaTreeMap
0 likes · 31 min read

This article explains the concept of Node.js streams, why they improve I/O performance and memory usage, and provides step‑by‑step examples of readable, writable, and transform streams—including piping, back‑pressure handling, and gzip compression.
BackendCompressionNode.js
0 likes · 5 min read

This article introduces Java 11's most useful enhancements—including the var keyword, new String utilities, collection factory methods, Stream API additions, InputStream.transferTo, and the revamped HttpClient—showing how each feature simplifies code and improves productivity for modern Java developers.
HttpClientInputStreamJava 11
0 likes · 7 min read

This article introduces the major Java 9‑11 language and API enhancements—including var type inference, the standardized HttpClient, immutable collection factories, new Stream methods, Optionals improvements, and additional VM features—providing concise code examples for engineers and architects.
HTTP ClientJavaJava 11
0 likes · 6 min read

A recap of Chengdu’s Node.js underground rail salon reveals how industry experts tackled enterprise‑grade challenges such as microservice architecture, security of third‑party dependencies, TypeScript adoption, RPC communication, and stream best practices, followed by an engaging round‑table discussion.
BackendEnterprise DevelopmentNode.js
0 likes · 4 min read

This guide walks through Redis 5's stream feature, showing how to set up a Docker Redis instance, add entries, perform range queries, use blocking reads, create and manage consumer groups, handle pending messages, claim ownership, inspect stream metadata, delete entries, and limit stream length for efficient message queue implementations.
BackendMessage Queueconsumer groups
0 likes · 10 min read

The article outlines Redis 5.0's major new capabilities—including Streams, module APIs, enhanced RDB metadata, cluster management improvements, new sorted‑set commands, active memory defragmentation, HyperLogLog upgrades, better memory reporting, HELP sub‑commands, connection performance, bug fixes, and Jemalloc 5.1—while also detailing important migration notes from version 4.0 and providing a reference link to the Streams introduction.
RDBVersion 5database
0 likes · 4 min read

This article explains Java's I/O system, detailing how streams and decorator patterns enable flexible file reading and writing, and provides clear code examples illustrating BufferedReader, FileReader, InputStream, and OutputStream usage.
BufferedReaderDecoratorFileReader
0 likes · 7 min read

This article provides a comprehensive guide to Java I/O, explaining the distinction between byte and character streams, the role of abstract and concrete stream classes, how the Decorator pattern extends functionality, the enhancements introduced in NIO.2, and the use of asynchronous I/O with Futures and Callbacks.
Decorator PatternI/OJava
0 likes · 28 min read

This article explains key Node.js design patterns—including EventEmitter, streams, control‑flow libraries, coding style, testing, and logging—providing practical guidance and recommended tools for building robust, maintainable backend applications.
EventEmitterNode.jsdesign patterns
0 likes · 11 min read

This article explains the concept of Java I/O streams, their classifications, and provides detailed code examples for InputStream, FileInputStream, FileOutputStream, BufferedOutputStream, and DataOutputStream, illustrating how to read, write, and manage resources effectively.
FileIOI/OInputStream
0 likes · 11 min read

This article explains the concept of streams, classifies Java IO streams into character/byte and input/output types, details the main InputStream and OutputStream class hierarchies, and describes related classes such as Reader, Writer, File, and RandomAccessFile for effective data handling.
IOInputStreamOutputStream
0 likes · 10 min read

Redis introduced the Streams data type to address limitations of sorted sets, lists, and Pub/Sub for handling continuous data flows, offering features like field-value entries, efficient range queries, and client blocking with ID tracking, and the article explains its design, commands, and usage examples.
Time Seriesdata structuresstreams
0 likes · 7 min read

This article explains Java 8 lambda expressions, their syntax, how to use streams with map, filter, and reduce operations, defines functional interfaces, and demonstrates advanced recursive lambda techniques such as the Y combinator, all with clear code examples.
Functional InterfaceJava8recursion
0 likes · 7 min read

This article provides a comprehensive overview of core Java concepts, including the hierarchy of I/O streams, checked and unchecked exceptions, built‑in and custom annotations, the class‑loader delegation model, important language keywords, multithreading techniques, thread‑pool implementations, and the Java memory model.
AnnotationsClass Loadingexceptions
0 likes · 17 min read

Explore the inner workings of Node.js streams—including readable, writable, duplex, transform, and pipe—through detailed explanations, code demos, and visual diagrams, revealing how backpressure, flow modes, and internal mechanisms shape data handling in backend development.
Backend DevelopmentDuplexNode.js
0 likes · 14 min read

This article reviews the essential Node.js core concepts—including the event loop, global and process objects, event emitters, streams and buffers, clustering, asynchronous error handling, and creating C++ addons—to help developers solidify their understanding and fill knowledge gaps.
BackendC++ AddonsNode.js
0 likes · 2 min read

The article explains how to build and manipulate Node.js stream pipelines—encapsulating multiple Transform streams into a reusable Duplex, using helper libraries like stream‑splicer, and demonstrates their role in Browserify’s module processing and Gulp’s file tasks, including a customizable changelog tool.
Build ToolsNode.jsPipeline
0 likes · 13 min read

This article explains Guava’s terminology for streams, the ByteStreams and CharStreams utility methods, the deprecation of InputSupplier/OutputSupplier, and introduces the source and sink abstractions with their creation methods, common operations, and practical code examples for handling byte and character data in Java.
ByteSourceCharSourceGuava
0 likes · 14 min read
