.TH "md_doc_decisions_global_plugins" 3elektra "Sat Jun 5 2021" "Version 0.9.6" "Elektra" \" -*- nroff -*-
.ad l
.nh
.SH NAME
md_doc_decisions_global_plugins \- Global Plugins 

.SH "Problem"
.PP
.IP "\(bu" 2
Notification does not happen once after final commit, but for every plugin
.IP "\(bu" 2
Problems in spec plugin
.PP
.PP
These problems can be traced back to the placement of the plugins\&. We need to cleanup and simplify the placement\&.
.SH "Constraints"
.PP
.IP "\(bu" 2
Plugin interface should be the same\&. Many plugins, e\&.g\&. dbus, should work as global plugins w/o any change in code (i\&.e\&. only changes in contract)
.IP "\(bu" 2
Global plugins might depend on specific applications or specific mount points (it should be possible to enforce global plugins for specific applications)\&.
.PP
.SH "Assumptions"
.PP
.IP "\(bu" 2
Elektra is useful with following types of global plugins:
.IP "  \(bu" 4
mmap
.IP "  \(bu" 4
spec
.IP "  \(bu" 4
gopts
.IP "  \(bu" 4
receiving of notifications (internalnotification)
.IP "  \(bu" 4
sending of notifications (dbus, \&.\&.\&.)
.PP

.IP "\(bu" 2
There are not too many types of global plugins, not more than 10
.PP
.SH "Considered Alternatives"
.PP
.IP "\(bu" 2
generic placements like /prerollback /rollback /postrollback /getresolver /pregetcache /pregetstorage /getstorage /postgetstorage /postgetcache /setresolver /presetstorage /setstorage /precommit /commit /postcommit which can be executed at: /init /deinit /foreach proved to be too complicated and untestable\&.
.PP
.SH "Decision"
.PP
Have hooks and API specific to the list of global plugins in assumptions\&. These hooks are not shared, so no \fClist\fP plugin is needed\&.
.PP
Installed plugins will be used\&.
.SH "Rationale"
.PP
.IP "\(bu" 2
allows adding more types of plugins later, also post-1\&.0
.IP "\(bu" 2
much clearer semantics for each type, no need to compromise
.IP "\(bu" 2
easier to implement
.PP
.SH "Implications"
.PP
.IP "\(bu" 2
remove \fCglobal-mount\fP command
.IP "\(bu" 2
command for mmap/notification/\&.\&.\&. enable disable (like current \fCkdb cache\fP tool)
.IP "\(bu" 2
remove \fClist\fP plugin
.IP "\(bu" 2
remove plugins that stop working or disallow global positioning for them
.IP "\(bu" 2
call \fCspec\fP as needed several times
.PP
.SH "Related Decisions"
.PP
.IP "\(bu" 2
\fBArray\fP
.PP
.SH "Notes"
.PP

