Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: Plugins #29

Open
macsnoeren opened this issue Apr 21, 2022 · 4 comments
Open

New feature: Plugins #29

macsnoeren opened this issue Apr 21, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@macsnoeren
Copy link
Owner

I got the idea to improve the framework with plugins to implement the required functionality instead of extending the class. The main application starts the node and adds the required plugins to the scene that is required to implement the application. Implementation of a discovery methodolgy is than simply done by the implementation of a plugin. Furthermore, sharing is made easier, because these pugins can be easily used by others. Therefore, this functionality will enable the open source creation of the functionality. I am also able to supply basic plugins to the scene like encryption, blockchain and discovery things. I will start developing this functionality and also try to create an example.

@macsnoeren macsnoeren self-assigned this Apr 21, 2022
@macsnoeren macsnoeren added the enhancement New feature or request label Apr 21, 2022
@macsnoeren
Copy link
Owner Author

Ohw ... the old ways to implement the framework shall still be available ;), not breaking you code.

@SamuelHaidu
Copy link
Contributor

I was thinking about this. Maybe can implemented with middlewares like http frameworks. The middleware will intercepted the message or connection make something and pass to the next step. Can be implemented compression, encryption, encode and decoding objects (like blocks on blockchain).

@macsnoeren
Copy link
Owner Author

Just like nodejs express framework or so. That sounds indeed interesting. I am now busy with experimenting with plugin framework. The plugins can interact on all the events that occur and are processed in the order that they have been added. It looks a bit like middleware solution.

@macsnoeren
Copy link
Owner Author

macsnoeren commented May 8, 2022

I am now considering a design pattern for this according to http frameworks. Not yet found a solution other than the plugin I already implemented some how. However, with the plugins all plugins are executed. Within the HTTP frameworks if next() is not called, the process stops. That is also great for error handling.

The difference with HTTP framework is that also functionality to send specific message for instance. Discovery functionality for example. That can be implemented well using plugins. I am struggling how this could be done using the design pattern of the http framework.

Do you have any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants