yuanyuancin

Results 8 issues of yuanyuancin

### 介绍 在master biz运行时可动态运维其余ark biz,支持对ark biz进行查询、安装、卸载、激活。 同时引入了事件模型,在 container、biz、plugin各个不同生命周期发布相应事件,可通过监听事件进行操作处理。 ![image](https://github.com/sofastack/sofa-ark/blob/master/resource/life-arch.png?raw=true) ### 难度: 🌟🌟🌟 ### 参考解析 Ark事件模型:https://www.sofastack.tech/projects/sofa-boot/sofa-ark-ark-event/ Telnet指令:https://www.sofastack.tech/projects/sofa-boot/sofa-ark-ark-telnet/ ### 重点源码 ``` com.alipay.sofa.ark.api.ArkClient#installOperation(com.alipay.sofa.ark.spi.model.BizOperation) com.alipay.sofa.ark.api.ArkClient#uninstallOperation com.alipay.sofa.ark.api.ArkClient#switchOperation com.alipay.sofa.ark.api.ArkClient#checkOperation com.alipay.sofa.ark.spi.event.ArkEvent com.alipay.sofa.ark.spi.service.event.EventAdminService ```

Currently, sofa-ark framework has officially released version 2.0. One of the major changes in version 2.0 is to embed the startup of ark container into the startup process of spring...

当前 embed 模式在 HandleArchiveStage 不再扫描 classpath 下符合格式的 biz,导致静态合并部署失效

### 介绍 SOFAArk2.0里应用有三种启动方式: - java -jar 方式启动 - IDE启动,指定SofaArkBootstrap.launch启动 - 内嵌模式启动 在embed模式下会将arkcontainer的启动内嵌在master biz spring上下文启动过程中,监听SpringApplicationEvent触发ark容器的启动,使得整个应用还是以AppClassLoader启动,对应用侵入较小。 arkcontainer的启动会发布Ark服务、执行pipeline。 ### 难度: 🌟🌟🌟🌟 ### 参考解析 - [非内嵌模式启动过程](https://www.sofastack.tech/projects/sofa-boot/sofa-ark-startup/) ![image](https://user-images.githubusercontent.com/7148759/49442454-86cdec00-f804-11e8-8298-4f6165631298.png) - 内嵌模式启动过程 ![image](https://user-images.githubusercontent.com/16517325/169310815-4dc12cb3-8b95-468e-8aa7-74d7248c12f4.png) - Ark服务机制 https://www.sofastack.tech/projects/sofa-boot/sofa-ark-ark-service/ ###...

原因 1. 缓存被清理com.alipay.sofa.ark.container.service.classloader.AbstractClasspathClassLoader#classCache 2. hook失效 com.alipay.sofa.ark.container.service.classloader.BizClassLoader#postLoadClass ![image](https://github.com/sofastack/sofa-ark/assets/16517325/8bf73450-a177-46cc-8189-508f8439d800) 可能存在的问题 在中间件兼容性不够完善等特殊场景中,模块被卸载后仍旧有很大可能会存在bizclassloader.loadclass()的行为,如果打破了该行为会导致不预期的ClassNotFoundException或NoClassDefFoundError jdk规范中classloader close后,通常会禁止新class define,但是仍旧会允许get loaded class

good first issue

ContainerClassLoader 类加载行为 1. 如果是 ark export 的类,委托应用类加载器加载(本地启动为AppClassLoader、SpringBoot启动LaunchedURLClassLoader) 2. 如果点1没找到,ContainerClassLoader 自身加载 sofa-ark-all 中的类 在修复 [Fix skywalking agent issues](https://github.com/sofastack/sofa-ark/pull/748) 后 ContainerClassLoader 类加载行为,改变为: 1. 如果是 ark export 的类,委托应用类加载器加载(本地启动为AppClassLoader、SpringBoot启动LaunchedURLClassLoader) 2. 如果点1没找到,ContainerClassLoader 自身加载 sofa-ark-all 中的类...

help wanted

fix https://github.com/koupleless/koupleless/issues/54 ### Motivation Explain the context, and why you're making that change. To make others understand what is the problem you're trying to solve. ### Modification Describe the idea...

cla:yes
size/L

1. support plugin management for biz. 2. support dynamic plugin installation in runtime. 3. support biz/plugin installation in runtime with extension params. 4. fix enforcement for embed. ## Summary by...

cla:yes
size/XL