\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_md_doc_decisions_0b_rejected_elektra_web_pubsub}%
\Hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_md_doc_decisions_0b_rejected_elektra_web_pubsub}%
 \hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1872}{}\doxysection{Problem}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1872}
To develop a \href{https://github.com/ElektraInitiative/libelektra/issues/252}{\texttt{ Web UI}}, we need to be able to remotely configure Elektra via a network socket.

The idea is to use a Pub/\+Sub concept to synchronize actions which describe changes in the Elektra state.\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1873}{}\doxysection{Constraints}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1873}

\begin{DoxyItemize}
\item We need to be able to synchronize all changes in Elektra with the Web UI.
\item This needs to be done via a network socket due to limitations of the Web.
\item That means we need to run an Elektra daemon ({\ttfamily elektrad}) to be able to connect to Elektra at any time.
\end{DoxyItemize}\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1874}{}\doxysection{Assumptions}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1874}
\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1875}{}\doxysection{Considered Alternatives}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1875}

\begin{DoxyItemize}
\item \href{https://zeromq.org/}{\texttt{ Zero\+MQ}}\+: small and popular library for pub/sub
\item \href{https://nanomsg.org/}{\texttt{ nanomsg}}\+: from the same author as Zero\+MQ, even smaller -\/ \href{https://nanomsg.org/documentation-zeromq.html}{\texttt{ https\+://nanomsg.\+org/documentation-\/zeromq.\+html}}
\item \href{https://redis.io/docs/manual/pubsub/}{\texttt{ redis}}\+: requires a running redis server
\item \href{https://kafka.apache.org/}{\texttt{ kafka}}\+: seems too big for Elektra
\item Zero\+MQ with \href{https://github.com/zeromq/JSMQ}{\texttt{ JSMQ}}.
\end{DoxyItemize}\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1876}{}\doxysection{Decision}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1876}
Don\textquotesingle{}t use pubsub at all.

Instead use REST API implemented by \`{}elektrad\`{}.\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1877}{}\doxysection{Rationale}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1877}
nanomsg sounds interesting, but isn\textquotesingle{}t as popular as Zero\+MQ, which is why there are no browser JS bindings available (only Node.\+js, which cannot be easily used for the Web UI).\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1878}{}\doxysection{Implications}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1878}
\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1879}{}\doxysection{Related Decisions}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1879}
\hypertarget{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1880}{}\doxysection{Notes}\label{doc_decisions_0b_rejected_elektra_web_pubsub_md_autotoc_md1880}
