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

backend plugin #2963

Open
vLesk opened this issue Sep 15, 2019 · 1 comment

Comments

@vLesk
Copy link
Contributor

commented Sep 15, 2019

Building upon the implementation of elektraPluginCommit in #2798, I would like to reimplement the Backend structure as a plugin. That would bring the following benefits:

  • Greater detachment from the core of libelektra, as KDB would only need to call the respective plugin functions,
  • Nesting plugins would be possible as backends could contain further backends.

Another problem I would like to solve with this implementation is that backends have a limited fixed amount of plugins that they can contain.

To solve this, I propose restructuring the plugin arrays (getplugins, setplugins and errorplugins) to arrays of linked lists. That way, plugins assigned to a specific role are added to the end of the list at the position corresponding to the role, with the possibility of a flexible number of further plugins being added to that role.

Due to complexity issues with operations such as file resolving and change recognition, the following roles will still only contain a single slot in their respective arrays:

  • getresolver
  • getstorage
  • rollback
  • setresolver
  • setstorage
  • commit

Implementing backends as plugins has already been discussed in #973 and #1274.

@vLesk vLesk added the enhancement label Sep 15, 2019
@vLesk vLesk added this to the 1.0.0 milestone Sep 15, 2019
@vLesk vLesk self-assigned this Sep 15, 2019
@vLesk vLesk changed the title `backend` plugin backend plugin Sep 15, 2019
@markus2330

This comment has been minimized.

Copy link
Contributor

commented Sep 15, 2019

Thank you for the summary!

vLesk added a commit to vLesk/libelektra that referenced this issue Sep 16, 2019
vLesk added a commit to vLesk/libelektra that referenced this issue Sep 16, 2019
vLesk added a commit to vLesk/libelektra that referenced this issue Sep 16, 2019
vLesk added a commit to vLesk/libelektra that referenced this issue Sep 16, 2019
@vLesk vLesk referenced this issue Sep 16, 2019
0 of 14 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.