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

Introduce run-time loaded modules #278

Open
KristianLyng opened this issue Nov 25, 2022 · 0 comments
Open

Introduce run-time loaded modules #278

KristianLyng opened this issue Nov 25, 2022 · 0 comments
Assignees
Labels
core/config Anything dealing with the configuration subsystem core/docs Core documentation, either actual documentation of technical tooling for documentation core/modules Anything dealing with the general module support enhancement New feature or request

Comments

@KristianLyng
Copy link
Collaborator

With the plugin package, we can do traditional dlOpen() type module loading, which would solve a number of maintenance problems, particularly for things like protocol buffers, where potentially large bulks of code need to be (re-)generated to track hardware/firmware changes, but the code is otherwise the same. It also allows us to isolate libraries with unreasonable dependencies into separate packages.

Looking at it, I think the basic scaffolding we got should work well. Some minor things though:

Modules access sender.Auto directly today, this might(!) not be possible. This can be easily solved by extending skogul.Module to include a type, for instance, and requiring modules to implement something like GetModules() []skogul.Module.

This will not require a great deal of code, but it will take some time because this is an area where ensuring the API is stable is absolutely crucial. Luckily, the Interfaces we've used so far have proven to be stable, so that's good, so it's mainly initialization that's sensitive.

Also, this makes documentation more interesting, but that's a fairly easily solved problem. Off-tree modules would still self-document the same way as always, but that would obviously not become part of the pre-generated manual file. Since we don't want to introduce a run-time dependency on rst2man, re-generating a man file isn't an option either, so I figure we start with just some run-time commands to print the documentation to std somewhat nicer than we do already with ./show. That's particularly sensitive, since it can be easily adjusted as we gain experience.

An other task to solve would be where to install and look for modules. Lacking a global config file, I see a new config option in our near future.

@KristianLyng KristianLyng added enhancement New feature or request core/config Anything dealing with the configuration subsystem core/modules Anything dealing with the general module support core/docs Core documentation, either actual documentation of technical tooling for documentation labels Nov 25, 2022
@KristianLyng KristianLyng self-assigned this Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core/config Anything dealing with the configuration subsystem core/docs Core documentation, either actual documentation of technical tooling for documentation core/modules Anything dealing with the general module support enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant