Re: About BCCSP plugin
Hi Yacov, David,
Thanks for your reply and I am still work in progress of investigation about how other golang based open source programs apply with plugin mode. (For ex some CNCF projects)
For my opinion, no matter plugin or not. In general programming implementation, we define interface as layers.
Taking BCCSP as sample, we use ECDSA covered maybe 90% of cases, as an adaptor from fabric to golang crypto lib.
However, when someone what a new crypto curve, for ex:
In general, to apply with ed25519 means an implementation as a new adaptor from BCCSP to golang crypto lib.
Ref to JDBC, there seems no central GitHub repo for mysql JDBC or postgreSQL JDBC.
If we keep ECDSA as pre defined implementation and we open interfaces as allow user providing/maintaining their own plugin in/adaptor implementation.
We can benefits from this one step further from interface into plugin in mode supporting.
Or say from software design patterns, as combination of dynamic, behaviors patterns etc… I hope to keep plugins.
And let’s see the efforts,
In general, at implementation level, plugin support means fabric (as a golang based binary) to invokes plugin code in binary files.
- As the facts there on GitHub, golang has limitation for plugin mode supporting.
My personal opinion on this: as we use golang, we should have default plugin mode in golang way, as language features.
- if we don’t like go limitations, how about WebAssembly? For ex:https://github.com/wasmerio/wasmer-go, https://github.com/WasmEdge/WasmEdge
I am still under investigation for the possibly to use WebAssembly as go plugin.
As a summary, I would like to decouple the questions as:
1. Should we keep plugin support as high level design in fabric?
As this question is about high level design, and following is related with implementation.
2. Should we keep plugin implemented in golang/ golang only?
3. Should we consider other way to support plugins as WebAssembly? And what’s the condition for fabric accept plugin mode in WebAssembly?
签名由 网易邮箱大师 定制
On 12/15/2021 05:28，Yacov<yacovm@...> wrote：