shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

[Task] upload plugin jar to admin, synchronize jar to bootstrap

Open moremind opened this issue 3 years ago • 7 comments

Description

upload plugin jar to admin, synchronize jar to bootstrap

Task List

  1. upload jar file api.
  2. control jar file api.for example: add plugin jar, remove plugin jar, modify plugin jar.
  3. syncronize jar file to bootstrap.
  4. load jar file from bootstrap dynamically.

moremind avatar May 05 '22 11:05 moremind

pls assign to me.

moremind avatar May 05 '22 11:05 moremind

I don't think this is a good idea. This looks a lot like osgi, dynamic plugging and unplugging, but this function is not suitable for cloud native scenarios, each gateway node is an image instance.

it is not safe to do so

li-keguo avatar May 06 '22 07:05 li-keguo

I don't think this is a good idea. This looks a lot like osgi, dynamic plugging and unplugging, but this function is not suitable for cloud native scenarios, each gateway node is an image instance.

it is not safe to do so

first, my idea from ShenyuLoaderService#loaderExtPlugins, ShenYu can load plugin from local file, why not load from remote file system. second, it like bundle of osgi, but shenyu's plugin is jar, this is supported feature, not necessary feature. third, I think ShenYu already supported load jar from local, why not think ShenYu Gateway safety?

this feature suit cluster mode, otherwise, if you upload plugin, you must upload jar to every gateway server manually in cluster enviroment,and about cloud native scenarios, it doesn't matter.

moremind avatar May 06 '22 08:05 moremind

Personally, I think it looks good

hutaishi avatar May 07 '22 04:05 hutaishi

image

@yu199195 @hutaishi @li-keguo

this is my preliminary idea.

  1. in admin, when upload plugin jar, generate signature,it keep jar's safety.
  2. in event, send event with signature by md5.
  3. in bootstrap, load plugin and put this plugin to pluginList.

moremind avatar May 07 '22 13:05 moremind

image

@yu199195 @hutaishi @li-keguo

this is my preliminary idea.

  1. in admin, when upload plugin jar, generate signature,it keep jar's safety.
  2. in event, send event with signature by md5.
  3. in bootstrap, load plugin and put this plugin to pluginList.

The idea is great, but how do we ensure that the newly added jar will run stably? How to ensure that the gateway is stable but productive during the loading process? We know that the load bytecode is used but the heap memory is special, but how to dynamically expand it?

li-keguo avatar May 07 '22 14:05 li-keguo

pls assign to me.

afumu avatar May 09 '22 15:05 afumu