HotswapProjects / HotswapAgent

Java unlimited redefinition of classes at runtime.
GNU General Public License v2.0
2.32k stars 491 forks source link

Thanks for your project #385

Open zyl19880411 opened 3 years ago

zyl19880411 commented 3 years ago

Hello! It has been half a year since I contacted your project. Many problems encountered in the deep packaging process have been solved one by one. Now, I provide services to more than 1,200 people in the company, saving a lot of precious time for our daily development. I am in China, most companies still use jdk8 for development, but dcevm 8 does not support advanced gc, can this problem be solved? I tried to use dcevm11, but HotswapAgent still has some compatibility issues, such as classloader. Currently, we cannot solve the problems including modifying the value of static variables and modifying the parent class and interface. If we can solve these two problems, that would be great. Thanks for your project

skybber commented 3 years ago

Thanks for feedback. Is G1 the advanced GC? Btw. SerialGC is faster in common development when CPU is not so stressed. Currently I have time only for dcevm11 and dcevm15. As far as parent class modification I have no intention to do it since would make DCEVM code much more complex and difficult to maintain. As far as static modification we can think about it, it would bee good to have it.

zyl19880411 commented 3 years ago

Advanced GC refers to non-serial GC. It is no problem to use serial GC in a test environment. It would be great if static fields can be modified. Spring plugin and spring mybatis plugin may have some issues. I have achieved a lot of compatibility with spring plugin and spring mybatis plugin. If I have the opportunity, I would like to contribute this part of the code, thank you again for providing such a good open source project

skybber commented 3 years ago

Dcevm8 supports CMS collector for some time look at:

https://github.com/HotswapProjects/openjdk-jdk8u-dcevm/commit/357a18f906c26b5f21f6d47ffdc7a736f1ca0262

binaries are available at:

https://github.com/TravaOpenJDK/trava-jdk-8-dcevm

(windows are not available since we did not solve problems with the build on Travis)

zyl19880411 commented 3 years ago

Thank you. This is exactly what I need. I'll try this tomorrow, and then give feedback

zyl19880411 commented 3 years ago

Great, thank you. I tried to use the version you provided, which is exactly what I need, but I found a small problem. In this version, hotswap agent is integrated in Contents/Home/lib/hotswap is like dcevm11, but it is not used, so I use it like this [-XX:+UseConcMarkSweepGC -javaagent:/Users/zhangyulong/Documents/agent/nest-hostswap/hotswap-agent/target/agent.jar] The agent is compiled by myself. I tried some scenarios with this jdk version and there is no problem, but do you know if this JDK version has some hidden problems? Can this be used in an online environment? (Although I will not do this)

skybber commented 3 years ago

There are same problems as in dcevm8 from github repository - it is not so stable like dcevm11.

zyl19880411 commented 3 years ago

The jdk with cms gc is enough for our test environment. I will continue to pay attention to the development of dcevm11, but currently hotswap agent 1.4.2 and jdk11 will have some compatibility issues. After I modify this problem, I will consider using a more stable dcevm11. Thank you again for your patient answers.

skybber commented 3 years ago

I return to the issue with static variables redefinition. Currently static initializer is called only for new static variables, the same applies for new enum values that are in principle static varaibles. The case of static variable modification or modification of initializer is much more difficult to handle since static variable could be modified from another place. Correct hotswap mechanism must check modification of initializer's bytecode, then it must check if value from original bytecode is changed and only if it is not changed it can call new static initializer - it is pretty challenging problem.

zyl19880411 commented 3 years ago

Okay, dcevm is already so powerful. Seeing your reply, I think it may not be easy to modify the parent class or modify static variables from the perspective of jvm. I have notified my colleagues in the company. These two issues should not affect their use. I first tried to use decvm7 + jdk7, but after multiple hot deployments, a core dump problem occurred. I am currently using decvm + jdk181. It has been running very stably on our server for half a year. thank you for your reply.

zyl19880411 commented 3 years ago

Dear: This project has become a must-have plugin for our company. More than 2,000 people have used it. In the process of using, I encountered many compatibility problems (most of the problems have been solved by me), such as incomplete support for Spring, etc. In the past year, I learned about the source code of your project and gained a lot of things. I think this is a treasure. I really admire your coding skills, including dcevm, thank you for your hard work

skybber commented 3 years ago

Thanks for feedback, could you publish you improvements to spring plugin to HA, it would help a lot to another users. You can contact me directly if you need.

zyl19880411 commented 2 years ago

Dear

I have been using your project for more than a year. In the process of use, I compatible with the company's internal middleware. It allows us to hot deploy almost 95% of the modified scenarios without re-release, saving a lot of developer time. In this process, I read almost all the hotwap source code, which greatly improved my java ability. This is a very valuable project. I think no one is more familiar with this source code except you. Hahahahaha, I really admire your code ability. If I have time, I would like to know more about the implementation details of Dcevm. I think I should be able to learn more there. Unfortunately, I only know Java now and cannot read the source code of Dcevm. , The Java system is too large to be compatible with all situations. If I want to use it better, I still need to do in-depth secondary development. I want to share my experience this year in my blog to benefit more people. I don’t know if it’s possible? Due to the company's internal reasons, my secondary development code cannot be open sourced. Can you authorize me a more open agreement alone, just like the MIT agreement, I only use it internally and will not sell it. In the future, I will contribute the code to benefit more people. thanks

UchihaYong commented 2 years ago

Dear

I have been using your project for more than a year. In the process of use, I compatible with the company's internal middleware. It allows us to hot deploy almost 95% of the modified scenarios without re-release, saving a lot of developer time. In this process, I read almost all the hotwap source code, which greatly improved my java ability. This is a very valuable project. I think no one is more familiar with this source code except you. Hahahahaha, I really admire your code ability. If I have time, I would like to know more about the implementation details of Dcevm. I think I should be able to learn more there. Unfortunately, I only know Java now and cannot read the source code of Dcevm. , The Java system is too large to be compatible with all situations. If I want to use it better, I still need to do in-depth secondary development. I want to share my experience this year in my blog to benefit more people. I don’t know if it’s possible? Due to the company's internal reasons, my secondary development code cannot be open sourced. Can you authorize me a more open agreement alone, just like the MIT agreement, I only use it internally and will not sell it. In the future, I will contribute the code to benefit more people. thanks

你好,可以请教您一些关于这个项目的问题吗?感谢!

zyl19880411 commented 2 years ago

Dear I have been using your project for more than a year. In the process of use, I compatible with the company's internal middleware. It allows us to hot deploy almost 95% of the modified scenarios without re-release, saving a lot of developer time. In this process, I read almost all the hotwap source code, which greatly improved my java ability. This is a very valuable project. I think no one is more familiar with this source code except you. Hahahahaha, I really admire your code ability. If I have time, I would like to know more about the implementation details of Dcevm. I think I should be able to learn more there. Unfortunately, I only know Java now and cannot read the source code of Dcevm. , The Java system is too large to be compatible with all situations. If I want to use it better, I still need to do in-depth secondary development. I want to share my experience this year in my blog to benefit more people. I don’t know if it’s possible? Due to the company's internal reasons, my secondary development code cannot be open sourced. Can you authorize me a more open agreement alone, just like the MIT agreement, I only use it internally and will not sell it. In the future, I will contribute the code to benefit more people. thanks

你好,可以请教您一些关于这个项目的问题吗?感谢!

QQ group 825199617