Author: Xiao Fu Ge blog: Bugstack. cn – summary of a series of original articles

Precipitation, share, grow, let yourself and others can gain something! 😄

Let a person be strange and embarrassed, say the book is a little inflated 💥, after all, this is not the process of the press, topic selection, solicitation, editing, reading, processing to publication and distribution.

But the book runs to 107 pages, 117,000 words, and 20 chapters covering three bytecode frameworks and JavaAgent use, along with the entire case source code!


To be fair, there is little systematic knowledge of bytecode programming on the market or in web search, largely because most developers have little exposure to it, including; ASM, Javassist, Byte-Buddy, and JavaAgent don’t have a big market and therefore don’t have a lot of data. But you’re already using it from other frameworks or middleware like you’re using it; Cglib, chaos engineering, non-invasive full-link monitoring and have you ever done an experiment using JetBrains – Agent.jar?


So this tech stack is always around you, you just haven’t seen it yet! When the interview comes one day, you’ve been working for five years.

Hitch a ride to show you the importance of this knowledgeAli Cloud challenge!

Reading is not the night five drum, but work by fits and starts! , not necessarily a book can read a gold house, but at the foot of the road with what pad are accumulated over a long period of time.

This is the book he produced


introduce

Bytecode programming started with the use of non-invasive full-link monitoring. What I learned before this is that if you want to monitor the health of the system, you usually need to collect method execution information by hard-coding buried points or AOP. To monitor the operating health of a system, such as time, exceptions, and input and output parameters. Such monitoring is time-consuming and difficult to maintain on a large number of systems, let alone monitoring the invocation links of a business process.

In 2010, Google released a paper called Dapper, A Large-scale Distributed Systems Tracing Infrastructure, This paper introduces the design and application experience of The tracking system Dapper in large-scale distributed system in Google production environment.

Such monitoring system uses Javaagent and bytecode operation framework to enhance bytecode for the methods to be monitored when the application system is loaded, also called staking. The result of the method processing is similar to what you hard-coded before, but this will reduce the overhead and concatenate business process relationships between multiple systems by defining call link ids. As a result, monitoring costs are greatly reduced and online problems are quickly located and handled.

The core knowledge of monitoring system is mainly Javaagent and bytecode operation. There are three commonly used frameworks in bytecode operation. ASM, Javassist, and Byte Buddy are all capable of bytecode operations. ASM is more low-level and requires knowledge of bytecode instructions and operand stack. It is better to learn books such as Java Virtual Machine Specification. Provides more advanced apis to manipulate bytecode.

In this book, Fuge will explain the use of these three bytecode frameworks respectively, and finally complete the case of full link monitoring combined with Javagent. By doing this, you can start with a case study, integrate boring bytecode programming into scenarios, and deepen your understanding and hands-on application. It also keeps you busy with CRUD development while increasing your knowledge stack and expanding your technical horizons. Maybe soon this technology could yield some valuable results for you too!

The author

The author, Xiao Fu Ge, has been engaged in front-line Internet Java development for many years. He is keen on summarizing the learning process and prefers to write the core content of Java. It aims to provide you with a clear and detailed learning tutorial to help you continue to precipitation. So put in the time to learn, organize, and write relevant materials, and if my article or book can help you, please support (follow, like, share)!

How to support:

  • Bugstack wormhole stack
  • Bookmark my blog: bugstack.cn
  • Share with your friends
  • You can also give my open source project a star 🦍”CodeGuide | programmers coding guidelines“-https://github.com/fuzhengwei/CodeGuide/wiki

If all this is done! Remember to add me to Wechat (Fustack), make a friend!

download

The contents include;

  1. Small Fu GeBytecode Programming
  2. A complete set of book corresponding source

Download mode;

  1. Open the external link to share the book: book.bugstack.cn/#s/51Es_z_Q
  2. The source code section of the book is available on the official account:Bugstack wormhole stackReply,Download the source codeavailable
  3. If the link failsBugstack wormhole stack, reply to the PDF for a new link to download
  4. Add the author wechat (FUstack) to get books and source code, but also convenient to do related technical exchanges
  5. Public account users, directly click below to read the original download

Due to network compatibility direct online reading may have font dislocation problem, please download to read, better experience!

Receive a tail

The first time to write a series of articles into a book, although free release, but also may be in the acquisition of books download and learning process found I write a typo and write a wrong name to spray me 🤮, if you have this impulse! Please add little Fuge wechat (public number: BugStack wormhole stack access), I will use my technical charm and explosive character to influence you, and modify my book content, 📝 record your achievements to: github.com/fuzhengwei/…

If you don’t understand things easily while reading this book, don’t worry if the author doesn’t make it clearer. A lot of knowledge or system building is not difficult, but is sometimes described as troublesome. Therefore, I am also very willing to learn this part of knowledge with you, and continue to sort out the problems more clearly in the discussion, and analyze the essence of the problem in a more understandable way.

Finally, I hope you are not just a CRUD toolman, but can expand your technical stack to strengthen your basic skills. ‘! Come on!