Tag: java
All the articles with the tag "java".
Load Testing HTTP APIs with JMeter (Part 1): Writing and Debugging Test Scripts
This article doesn't go into much detail about JMeter's components and their concepts; in my view, the official documentation is already the most essential learning material, and once you've configured a few scripts yourself you'll basically know what each component is for. If you want to learn JMeter, read the official documentation and look things up whenever a concept or setting is unclear — readers who are just getting started should also spend more time on the FAQ and Best Practices sections.
Using Log4j2 (Part 3): Different Configurations for Different Environments
Explains ways to use different Log4j2 output formats and configurations across environments, including SystemPropertyArbiter, property substitution, custom Lookup plugins, and ScriptAppenderSelector. It discusses the choice between startup options and code extensions in the context of project deployment workflows.
Programming Visualization Websites and Tools (Continuously Updated)
A collection of visualization websites and tools for understanding programming concepts, including Git practice, regular expression testing, Wireshark packet analysis, and shell command explanations. Interactive demonstrations and hands-on practice make it easier to understand how these concepts work and provide a reference for later use.
Implementing Rate-Limiting Algorithms with Lua Scripts
Lua scripts executed and debugged in Redis implement fixed-window, sliding-window, token-bucket, and leaky-bucket rate limiting. Request-count examples explain fixed-window boundary issues and discuss where the algorithms fit in rate limiting and traffic shaping.
Using Hibernate Validator (Part 1)
Introduces Hibernate Validator alongside the Jakarta Bean Validation specification, covering constraint annotations, cascading validation, and method parameter and return-value validation. English and Chinese error-message examples demonstrate internationalization, followed by an analysis of how RESTEasy switches validation messages according to the request language.
MySQL Notes
MySQL study and development notes covering connection methods, data types, primary keys and indexes, storage engines, and transaction isolation levels. Through examples it discusses dirty reads, non-repeatable reads, phantom reads, and locks, and also records execution plan analysis, SQL optimization, and the roles of common logs.
Using the Elasticsearch Java API
Starting with the Search API request structure and Query DSL, this article explains how to organize Elasticsearch query conditions, sorting, returned fields, and pagination. Examples show how to convert DSL into Java API calls and enable request logging for debugging.
Using Log4j2 (Part 2): Changing Log Levels at Runtime
Two ways to adjust Log4j2 log levels without restarting an application: changing the configuration through JMX in JConsole, or calling the programmatic configuration API through an HTTP endpoint. A production troubleshooting scenario illustrates when each approach is useful.