This tutorial walks you through Python's built‑in JSON handling, covering reading JSON files, converting between JSON strings and Python objects, using pandas for JSON parsing, and applying serialization, deserialization, and pretty‑printing techniques with complete code examples.
This article walks through Dubbo’s RPC encoding and decoding mechanisms, explaining how Netty pipelines add codec handlers, detailing the message header format, exploring Hessian2 serialization, and answering common pitfalls such as class‑path changes and field mismatches.
This article explains how Java's serialization mechanism uses serialVersionUID to ensure class version compatibility, demonstrates default and explicit UID generation, shows code examples for serialization and deserialization, and explores various scenarios including field changes, static variables, inheritance, and the transient keyword.
The article explains how Dubbo can use the Protostuff library as a drop‑in replacement for .proto files to perform Protobuf TLV serialization, detailing the wire‑type encoding, Maven setup, POJO example, byte‑level analysis, Dubbo configuration, and tips for reducing serialization overhead.
An in‑depth guide demonstrates how to combine Netty with Protostuff for high‑performance RPC, detailing serialization setup, custom encoder/decoder implementation, multi‑threading pitfalls, and stress‑testing results that achieve up to 400,000 objects per second per server in a clustered environment.
This article presents a practical Netty‑based RPC solution using Protostuff serialization, detailing large‑scale stress testing, performance bottlenecks, and code‑level optimizations that enable handling hundreds of thousands of objects per second reliably.
This article details how to build a high‑performance Netty RPC system using Protostuff for serialization, covering dependency setup, custom encoder/decoder implementation, multithreaded buffer handling, and stress‑test results that achieve hundreds of thousands of objects per second per server.
Protocol Buffers (ProtoBuf) is a language‑neutral, binary serialization format that enables compact, fast data exchange and easy backward‑compatible schema evolution across many languages, with automatic code generation, making it ideal for gRPC and storage despite being non‑human‑readable.
This article compares the main HTTP API design styles—REST, RPC, and GraphQL—explaining their principles, typical code examples, and trade‑offs, and also discusses serialization formats such as protobuf and JSON, helping backend developers choose the most suitable approach.
This article examines Alibaba's FastJson library, comparing its parsing speed and popularity against Jackson and Gson, presents benchmark results, highlights code defects and unresolved issues, and concludes with recommendations for using Jackson over FastJson in Java backend projects.
This article explains why RPC is essential for distributed services, defines its core concepts and architecture, compares it with REST, SOAP and SOA, outlines the components and call flow, and reviews key technologies and popular Java‑based RPC frameworks such as Dubbo, Thrift and Avro.
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.
This article compares the performance of Python's built‑in json module with popular third‑party libraries ujson, rapidjson, and the Rust‑based orjson, showing benchmark results, installation tips, code examples, and known bugs to help developers choose the most efficient JSON serializer.
This article shares Laiye Technology's practical experience with Protobuf and gRPC, covering performance benefits, common pitfalls such as naming and compatibility issues, and the engineering solutions they implemented—including naming conventions, review processes, unified CI compilation, automatic client generation, version tagging, and Swagger documentation—to streamline large‑scale microservice development.
This article explains five core techniques for instantiating Java objects—including the new keyword, Class.newInstance(), Constructor.newInstance(), clone(), and deserialization—provides code examples for each method, and demonstrates their usage in a complete program with sample output.
This article explains Java's Serializable interface, the concepts of serialization and deserialization, when to use them, how to implement them with code examples, and dives into common issues such as transient fields, static variables, and mismatched serialVersionUID values that can cause runtime errors.
This article details a production incident where Redis memory usage surged due to improper Set serialization, explains the investigation of storage structures and capacity formulas, and outlines a step‑by‑step data migration and cleanup process to restore normal operation.
This article explains the fundamentals of RPC protocols, compares common designs such as HTTP/1.1, RESP, HTTP/2, and gRPC, and outlines the motivations and key features of Dubbo 3.0’s next‑generation protocol for better performance, extensibility, and cross‑language support.
This guide walks through building a Netty server and client that exchange Java objects using Protobuf serialization, covering .proto definition, code generation with protoc, pipeline configuration with Netty's Protobuf handlers, and full example implementations for both sides.
This article introduces Protocol Buffers, explains its advantages over XML, and provides a step‑by‑step guide for defining .proto files, compiling them with protoc, configuring a Java Gradle project, and writing code to serialize and deserialize objects using the generated classes.
This guide explains what Protocol Buffers are, compares them with XML, shows how to define a .proto schema, compile it with protoc, add the generated classes to a Java Gradle project, and demonstrates object serialization and deserialization with concrete code examples.
The article explains why serialization is essential for inter‑process communication, compares common formats like JSON, Protobuf, Kryo, and custom binary schemes, outlines selection criteria such as readability, complexity, speed and density, and provides code examples and interview‑style Q&A for high‑performance messaging systems.
This article introduces Google’s Protocol Buffers (ProtoBuf), explains its principles, shows how to install the compiler, provides a complete Java example for defining, compiling, and using .proto files, and compares its encoding speed and memory usage against JSON, highlighting ProtoBuf’s advantages.
This article provides an in‑depth explanation of Java's ArrayList, covering its purpose, lack of thread safety, detailed source‑code analysis of fields, constructors and core methods, serialization mechanics, capacity handling, and a simplified hand‑written implementation for interview preparation.
This article explains the Java RMI communication model, the need for object serialization, the requirements for serializable classes, and provides complete example code for a Person class, object I/O operations, and a simple socket‑based stub‑skeleton implementation to demonstrate remote object retrieval.
This article explains Java serialization and deserialization, the role of the Serializable interface and serialVersionUID, demonstrates how to implement and test them with code examples, and discusses related features such as transient and static fields, providing practical insights for Java developers.
This guide explains how Laravel Eloquent can serialize models and their relationships to arrays or JSON, control visible and hidden attributes, append custom values, and customize date formatting using casts and Carbon serialization, with practical code examples for each feature.
This article provides a comprehensive overview of Kafka's Producer side, covering its architecture, the ProducerRecord data structure, serialization mechanisms, partitioning logic, and the accumulator buffer, while comparing old and new Producer clients and illustrating key configurations with code examples.
Explore Java's built‑in serialization mechanism from its origins in JDK 1.1, learn how to implement Serializable and Externalizable, see practical code examples, understand the impact of static and transient fields, and master serialVersionUID to avoid deserialization errors.
This article explains the concept of object serialization, compares generic formats like JSON/XML with binary approaches, discusses optimization principles, key performance metrics, and reviews major serialization frameworks such as Protobuf, Thrift, Hessian, Kryo, and Avro, while also covering TLV encoding, varint algorithms, and practical pitfalls.
This article dives deep into Java's serialization mechanism, explaining the theory behind the Serializable interface, demonstrating practical examples with code, exploring the impact of static and transient fields, comparing Serializable with Externalizable, and clarifying the role of serialVersionUID in version compatibility.
The article examines why enums, while type‑safe and convenient for input parameters, are often criticized in API return values due to their lack of extensibility and the risk of deserialization errors when newer enum constants appear after version upgrades.
The article explains why using enums as API return values is often criticized, highlighting their lack of extensibility, potential serialization errors when newer enum values appear, and contrasting this with the safety they provide as input parameters, illustrated with Java examples and community opinions.
This article introduces JSON basics, explains the Fastjson library from Alibaba, outlines its key features, and provides practical Java code examples for parsing, serializing, and converting between JSON strings, objects, arrays, maps, lists, and beans using Fastjson’s API.
This article explains what Java serialization and deserialization are, why they are needed for object persistence and distributed systems, and provides step‑by‑step code examples showing how to implement them using the Serializable interface and ObjectOutputStream.
This article examines Xiaomi's migration from Spark Streaming to Apache Flink, comparing scheduling strategies, mini‑batch versus true streaming, resource utilization, latency, and serialization mechanisms, and concludes with practical insights and custom optimization techniques for large‑scale data processing.
This article explains two approaches—reflection‑based schema inference and programmatic schema definition—to transform a Spark RDD into a DataSet or DataFrame, demonstrates the required code, and discusses common Task‑not‑serializable errors with practical solutions.
This article explores a collection of useful yet often overlooked Python features—including functions with arbitrary arguments, file searching with glob, debugging with inspect, generating unique IDs, serialization, compression, and registering shutdown hooks—providing clear code examples and practical explanations for each.
This article walks through why developers should replace FastJson with Gson, explains Gson's core features, demonstrates basic and advanced serialization and deserialization—including handling arrays, collections, generic types, custom serializers, and annotations—while providing complete code examples and best‑practice tips.
This article examines how to correctly define boolean-type member variables in Java POJOs, comparing primitive boolean and wrapper Boolean, discussing naming conventions like success vs isSuccess, default values, JavaBeans getter/setter rules, and the impact on JSON serialization across fastjson, Gson, and Jackson.
This article walks through building a simple RPC framework in Go using about 300 lines of code, covering RPC fundamentals, TLV network data format, serialization, transport layer, server and client implementations, and a complete example to help readers understand RPC concepts.
This article explains how to improve Spark and Spark Streaming performance by tuning serialization, broadcast variables, parallelism, batch intervals, memory usage, garbage collection, and Kafka integration, providing practical code examples and real‑world optimization results.
This article presents a real‑device performance test of three data serialization structures—JSON, Protocol Buffers, and FlatBuffers—used in H5‑Hybrid and Flutter development, analyzing their size, serialization/deserialization speed, and suitability for Android, Flutter, and H5 communication channels.
This article presents a real‑device performance comparison of Json, Protocol Buffers and FlatBuffers across Android, Flutter and H5 channels, explains their internal structures, shows serialization/deserialization code, and provides practical guidance on choosing the right format for mobile data transmission.
This article explores Java's serialization mechanism in depth, covering its history, the Serializable and Externalizable interfaces, practical code examples, the impact of static and transient fields, serialVersionUID nuances, and common pitfalls to help developers write robust, version‑compatible Java code.
This article examines various Java singleton implementations—eager, lazy, double‑checked locking, static inner class, enum, and Kotlin object—analyzing their thread safety, reflection and serialization vulnerabilities, and shows how to harden them using volatile, constructor guards, and readResolve.
The article examines Hadoop’s RPC framework—detailing its client‑server workflow, core classes (RPC, Client, Server), dynamic proxy handling, NIO‑based server threading, configurable concurrency controls such as FairCallQueue, and a practical HDFS mkdir command example, illustrating high‑performance distributed communication.
The article explains how Flink's shuffle pipeline—from upstream data serialization to downstream consumption—is optimized through a credit‑based flow‑control mechanism, zero‑copy network buffers, broadcast serialization reduction, external shuffle service, and a plugin‑based shuffle manager, resulting in significant performance gains for both streaming and batch jobs.
The article explains Dubbo's exception‑filter mechanism, demonstrates with a HelloException example why a custom RuntimeException is wrapped into a generic RuntimeException on the consumer side, analyzes the source code logic that decides when to re‑throw or wrap exceptions, and offers practical ways to avoid this pitfall in real projects.
This article explains Java reflection, serialization, dynamic proxy mechanisms, and object cloning techniques, including code examples and the differences between deep and shallow copies, providing a comprehensive overview of these core Java concepts.
This article reveals several lesser‑known Python features—including functions that accept arbitrary arguments, powerful file searching with glob, debugging with inspect, generating unique IDs via uuid, data serialization, string compression, and registering shutdown hooks—providing practical code examples for each.
This article presents a comprehensive guide to improving SOFARPC performance, covering custom BOLT protocol design, Netty transport optimizations, serialization choices, batch decoding, and client‑proxy benchmarking, with practical code demos and configuration recommendations for Java RPC services.
This article introduces the "Big Data Path to God" series, lists several Java advanced topics, and provides a comprehensive Netty guide covering BIO/NIO/AIO differences, Netty features, threading model, TCP packet handling, serialization choices, zero‑copy, performance aspects, and key source‑code components.
The article examines Flutter’s limited built-in JSON handling, explains why the popular json_serializable package can fall short for complex, generic objects, and introduces fish-serializable—a custom library with a ValueHolder, FishSerializable interface, JsonSerializer, and IntelliJ plugin—already used in production at Alibaba’s Xianyu and soon to be open-sourced.
This article provides a step‑by‑step guide on installing the Protobuf compiler, setting up the Go plugin, writing .proto definitions, generating Go code, and demonstrating serialization and deserialization of Protobuf messages in a Go application, complete with troubleshooting tips and reference links.
The article presents a detailed technical critique of Protocol Buffers, highlighting its amateur origins, lack of composability, problematic type system choices, misleading backward‑compatibility claims, and the way it pollutes codebases, ultimately arguing that developers should avoid adopting it for new projects.
This article introduces the SCF RPC framework developed by 58, covering its overall architecture, synchronous and callback call modes, timeout handling, custom serialization techniques, service registration and discovery using etcd, as well as data collection, storage, and monitoring mechanisms for large‑scale distributed services.
Java object serialization converts objects into byte streams for storage or transmission, while the transient keyword excludes specific fields from this process; this article explains serialization concepts, appropriate use cases for transient, provides code examples, and shows the impact on object state after deserialization.
This article explains the fundamentals of Remote Procedure Call (RPC), covering its definition, architectural components, communication protocols, serialization process, complete call workflow, and the main technologies and frameworks used in modern backend systems.
This article introduces several often‑overlooked Python features—including functions that accept arbitrary arguments, file searching with glob, debugging with inspect, generating unique IDs via uuid, data serialization, string compression, and registering shutdown functions with atexit—providing concise examples and visual code snippets.
This article explains the core principles of RPC message protocol design, covering how to determine message boundaries, choose between delimiter and length‑prefix methods, handle explicit and implicit message structures, apply compression, and implement varint and zigzag encoding for optimal traffic efficiency.
This article provides an overview of Java's ArrayList class, explaining its dynamic array implementation, thread-safety considerations, key interfaces, constructors, capacity management, core methods, and internal mechanisms such as ensureCapacity, trimToSize, and serialization, accompanied by detailed source code excerpts and practical insights.
This article explains Java serialization and deserialization fundamentals, why they are needed, the underlying algorithms, the JDK APIs, step‑by‑step code examples, important considerations, and best practices for safely persisting and transmitting object state.
This article explains Java object cloning, detailing why cloning is needed, how to implement shallow and deep copies using the Cloneable interface and serialization, and provides comprehensive code examples illustrating the differences and pitfalls of reference copying.
This guide explains why and how to use Google Protocol Buffers for efficient data exchange in iOS, covering environment setup, installation, .proto definition, compilation to Objective‑C files, project integration, and a complete encode/decode test with sample code.
This article explains the purpose and usage of Java's transient keyword, demonstrates how it prevents sensitive fields from being serialized, summarizes key rules, and explores edge cases including static fields and the Externalizable interface where transient fields can still be manually serialized.
HSF 2.2 introduces a clear three‑domain architecture, async call interceptors, multi‑application support, and several serialization and map‑operation optimizations that together reduced CPU usage, network traffic and latency, enabling Alibaba to handle over 3.5 trillion calls during the 2017 Double‑11 event.
This article introduces buddha, a lightweight distributed RPC framework, detailing its design principles, serialization choices, TCP packet handling, BIO vs NIO networking, service registration and discovery using ZooKeeper, and provides implementation insights for building efficient remote procedure call systems.
By serializing user feature data with Java's Protostuff (built on Protobuf) and then applying JDK Gzip compression before storing it in Redis, the author shrank typical 70 KB per‑user payloads to under 10 KB, enabling billions of records with cross‑language compatibility and no schema‑breakage.
This article provides a comprehensive tutorial on Java I/O streams, covering byte streams, character streams, buffered streams, line‑oriented I/O, scanning and formatting APIs, command‑line I/O, data streams for primitive types, and object streams for serialization, with detailed code examples and best‑practice guidelines.
This article walks through creating a minimal blockchain in Haskell, covering data structures, serialization, mining logic, difficulty adjustment, and command‑line tools for mining and balance listing, while illustrating core concepts such as Merkle trees, hash functions, and transaction validation.
This article presents a comprehensive Java benchmark that compares JSON libraries (Jackson, Fastjson, DSL‑JSON, Jsoniter, Thrift) with Google Protocol Buffers across various data types and structures, revealing where Protobuf truly outperforms JSON and where modern JSON parsers narrow the gap.
This article explains what JSON is, why it’s ideal for data exchange, contrasts it with JavaScript objects, and dives deep into JSON.stringify, JSON.parse, and toJSON, illustrating each concept with clear code examples and practical tips for developers.
This article benchmarks Java JSON libraries against Google Protobuf, analyzing decode/encode performance for integers, doubles, strings, objects, and lists, revealing that while Protobuf often outperforms JSON, optimized JSON libraries like DSL‑JSON can narrow the gap dramatically.
This article explains how attackers can combine SSRF vulnerabilities with unauthorized Redis access and unsafe serialization in Celery to infiltrate internal networks, illustrating the attack flow, exploitation techniques, and mitigation considerations for operations and security teams.
This article explains Dubbo’s network transport architecture, the Dubbo protocol with Hessian2 serialization, details the encoding/decoding process using Netty, and proposes optimization techniques such as reducing array copies, leveraging Netty 4 decoders, compressing binary data, and adopting alternative high‑performance serialization formats.
The article explains how insecure serialization in message‑queue middleware, especially Python's pickle used by Celery, can be abused to inject malicious payloads that trigger remote code execution on distributed workers, and it demonstrates detection and exploitation techniques against vulnerable Redis and MongoDB brokers.
The article explains Java serialization and deserialization concepts, provides sample code for serializing a string to a file and restoring it, describes how insecure deserialization leads to remote code execution vulnerabilities illustrated by ActiveMQ, JBoss and Jenkins cases, and outlines mitigation techniques such as class whitelisting, encryption, and using transient fields.
The article explains how Flink tackles JVM memory challenges by using proactive memory management, a custom serialization framework, cache‑friendly binary operations, and off‑heap memory techniques to reduce GC pressure, avoid OOM, and improve performance in big‑data workloads.
This article explains why cache and database can become inconsistent in distributed systems, why the "invalidate‑cache‑then‑write‑DB" rule is preferred, and presents practical serialization techniques—modifying DB and service connection pools—to guarantee per‑key sequential execution while maintaining availability and load balance.
The article explains how a widespread Java serialization vulnerability lets attackers execute remote commands by deserializing malicious objects, and describes a practical mitigation that overrides ObjectInputStream’s resolveClass method to enforce a whitelist, preventing unauthorized class instantiation without rewriting application code.
This article explains how large‑scale internet companies replace local service calls with remote procedure calls (RPC), covering Java dynamic proxies, message encoding, serialization, asynchronous response handling, and Zookeeper‑based service registration and discovery to achieve transparent, scalable service communication.
This article explains Netty's autoread switch, isWritable back‑pressure mechanism, and serialization strategies, showing how to control read/write rates, avoid thread‑pool overload, and reduce memory copies when handling TCP byte streams in high‑performance Java network applications.
The article explains serialization and deserialization fundamentals, compares key protocols (XML/SOAP, JSON, Thrift, Protobuf, Avro) across readability, performance, extensibility and security, presents benchmark results, and offers practical guidelines for choosing the most suitable format for various distributed system scenarios.