afb-api-so: adds verbosity on dlopen error
[src/app-framework-binder.git] / doc / afb-events-guide.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <meta name="generator" content="pandoc">
6   <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7   <meta name="author" content="José Bollo">
8   <title>Guide for developing with events</title>
9   <style type="text/css">code{white-space: pre;}</style>
10   <style type="text/css">
11 div.sourceCode { overflow-x: auto; }
12 table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
13   margin: 0; padding: 0; vertical-align: baseline; border: none; }
14 table.sourceCode { width: 100%; line-height: 100%; }
15 td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
16 td.sourceCode { padding-left: 5px; }
17 code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
18 code > span.dt { color: #902000; } /* DataType */
19 code > span.dv { color: #40a070; } /* DecVal */
20 code > span.bn { color: #40a070; } /* BaseN */
21 code > span.fl { color: #40a070; } /* Float */
22 code > span.ch { color: #4070a0; } /* Char */
23 code > span.st { color: #4070a0; } /* String */
24 code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
25 code > span.ot { color: #007020; } /* Other */
26 code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
27 code > span.fu { color: #06287e; } /* Function */
28 code > span.er { color: #ff0000; font-weight: bold; } /* Error */
29 code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
30 code > span.cn { color: #880000; } /* Constant */
31 code > span.sc { color: #4070a0; } /* SpecialChar */
32 code > span.vs { color: #4070a0; } /* VerbatimString */
33 code > span.ss { color: #bb6688; } /* SpecialString */
34 code > span.im { } /* Import */
35 code > span.va { color: #19177c; } /* Variable */
36 code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
37 code > span.op { color: #666666; } /* Operator */
38 code > span.bu { } /* BuiltIn */
39 code > span.ex { } /* Extension */
40 code > span.pp { color: #bc7a00; } /* Preprocessor */
41 code > span.at { color: #7d9029; } /* Attribute */
42 code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
43 code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
44 code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
45 code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
46   </style>
47   <link rel="stylesheet" href="doc.css">
48   <!--[if lt IE 9]>
49     <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
50   <![endif]-->
51 </head>
52 <body>
53 <header>
54 <h1 class="title">Guide for developing with events</h1>
55 <h2 class="author">José Bollo</h2>
56 <h3 class="date">19 septembre 2016</h3>
57 </header>
58 <nav id="TOC">
59 <ul>
60 <li><a href="#guide-for-developing-with-events">Guide for developing with events</a><ul>
61 <li><a href="#overview-of-events">Overview of events</a><ul>
62 <li><a href="#subscribing-and-unsubscribing">Subscribing and unsubscribing</a></li>
63 <li><a href="#generating-and-pushing-signals-and-data">Generating and pushing signals and data</a></li>
64 <li><a href="#receiving-the-signals">Receiving the signals</a></li>
65 <li><a href="#the-exceptional-case-of-wide-broadcast">The exceptional case of wide broadcast</a></li>
66 </ul></li>
67 <li><a href="#reference-of-functions">Reference of functions</a><ul>
68 <li><a href="#function-afb_event-afb_daemon_make_event">Function afb_event afb_daemon_make_event</a></li>
69 <li><a href="#function-afb_event_push">Function afb_event_push</a></li>
70 <li><a href="#function-afb_event_drop">Function afb_event_drop</a></li>
71 <li><a href="#function-afb_req_subscribe">Function afb_req_subscribe</a></li>
72 <li><a href="#function-afb_req_unsubscribe">Function afb_req_unsubscribe</a></li>
73 <li><a href="#function-afb_event_broadcast">Function afb_event_broadcast</a></li>
74 <li><a href="#function-afb_daemon_broadcast_event">Function afb_daemon_broadcast_event</a></li>
75 </ul></li>
76 <li><a href="#architectural-digressions">Architectural digressions</a><ul>
77 <li><a href="#strict-separation">Strict separation</a></li>
78 <li><a href="#soft-composition">Soft composition</a></li>
79 </ul></li>
80 </ul></li>
81 </ul>
82 </nav>
83 <h1 id="guide-for-developing-with-events">Guide for developing with events</h1>
84 <p>Signaling agents are services that send events to any clients that subscribed for receiving it. The sent events carry any data.</p>
85 <p>To have a good understanding of how to write a signaling agent, the actions of subscribing, unsubscribing, producing, sending, receiving events must be described and explained.</p>
86 <h2 id="overview-of-events">Overview of events</h2>
87 <p>The basis of a signaling agent is shown on the following figure:</p>
88 <figure>
89 <img src="signaling-basis.svg" alt="scenario of using events" /><figcaption>scenario of using events</figcaption>
90 </figure>
91 <p>This figure shows the main role of the signaling framework for the propagation of events.</p>
92 <p>For people not familiar with the framework, a signaling agent and a “binding” are similar.</p>
93 <h3 id="subscribing-and-unsubscribing">Subscribing and unsubscribing</h3>
94 <p>Subscribing and subscription is the action that makes a client able to receive data from a signaling agent. Subscription must create resources for generating the data and for delivering the data to the client. These two aspects are not handled by the same piece of software: generating the data is the responsibility of the developer of the signaling agent while delivering the data is handled by the framework.</p>
95 <p>When a client subscribes for data, the agent must:</p>
96 <ol type="1">
97 <li>check that the subscription request is correct;</li>
98 <li>establish the computation chain of the required data, if not already done;</li>
99 <li>create a named event for the computed data, if not already done;</li>
100 <li>ask the framework to establish the subscription to the event for the request;</li>
101 <li>optionally give indications about the event in the reply to the client.</li>
102 </ol>
103 <p>The first two steps are not involving the framework. They are linked to the business logic of the binding. The request can be any description of the requested data and the computing stream can be of any nature, this is specific to the binding.</p>
104 <p>As said before, the framework uses and integrates “libsystemd” and its event loop. Within the framework, &quot;libsystemd&quot; is the standard API/library for bindings expecting to setup and handle I/O, timer or signal events.</p>
105 <p>Steps 3 and 4 are bound to the framework.</p>
106 <p>The agent must create an object for handling the propagation of produced data to its clients. That object is called “event” in the framework. An event has a name that allows clients to distinguish it from other events.</p>
107 <p>Events are created using the <strong><em>afb_daemon_make_event</em></strong> function that takes the name of the event. Example:</p>
108 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c">    event = afb_daemon_make_event(afb_daemon, name);</code></pre></div>
109 <p>Once created, the event can be used either to push data to its subscribers or to broadcast data to any listener.</p>
110 <p>The event must be used to establish the subscription for the requesting client. This is done using the <strong><em>afb_req_subscribe</em></strong> function that takes the current request object and event and associates them together. Example:</p>
111 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c">    rc = afb_req_subscribe(afb_req, event);</code></pre></div>
112 <p>When successful, this function make the connection between the event and the client that emitted the request. The client becomes a subscriber of the event until it unsubscribes or disconnects. The <strong><em>afb_req_subscribe</em></strong> function will fail if the client connection is weak: if the request comes from a HTTP link. To receive signals, the client must be connected. The AGL framework allows connections using WebSocket.</p>
113 <p>The name of the event is either a well known name or an ad hoc name forged for the usecase.</p>
114 <p>Let's see a basic example: client A expects to receive the speed in km/h every second while client B expects the speed in mph twice a second. In that case, there are two different events because it is not the same unit and it is not the same frequency. Having two different events allows to associate clients to the correct event. But this doesn't tell any word about the name of these events. The designer of the signaling agent has two options for naming:</p>
115 <ol type="1">
116 <li>names can be the same (“speed” for example) with sent data self-describing itself or having a specific tag (requiring from clients awareness about requesting both kinds of speed isn't safe).</li>
117 <li>names of the event include the variations (by example: “speed-km/h-1Hz” and “speed-mph-2Hz”) and, in that case, sent data can self-describe itself or not.</li>
118 </ol>
119 <p>In both cases, the signaling agent might have to send the name of the event and/or an associated tag to its client in the reply of the subscription. This is part of the step 5 above.</p>
120 <p>The framework only uses the event (not its name) for subscription, unsubscription and pushing.</p>
121 <p>When the requested data is already generated and the event used for pushing it already exists, the signaling agent must not instantiate a new processing chain and must not create a new event object for pushing data. The signaling agent must reuse the existing chain and event.</p>
122 <p>Unsubscribing is made by the signaling agent on a request of its client. The <strong><em>afb_req_unsubscribe</em></strong> function tells the framework to remove the requesting client from the event's list of subscribers. Example:</p>
123 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c">    afb_req_unsubscribe(afb_req, event);</code></pre></div>
124 <p>Subscription count does not matter to the framework: subscribing the same client several times has the same effect that subscribing only one time. Thus, when unsubscribing is invoked, it becomes immediately effective.</p>
125 <h4 id="more-on-naming-events">More on naming events</h4>
126 <p>Within the AGL framework, a signaling agent is a binding that has an API prefix. This prefix is meant to be unique and to identify the binding API. The names of the events that this signaling agent creates are automatically prefixed by the framework, using the API prefix of the binding.</p>
127 <p>Thus, if a signaling agent of API prefix <strong><em>api</em></strong> creates an event of name <strong><em>event</em></strong> and pushes data to that event, the subscribers will receive an event of name <strong><em>api/event</em></strong>.</p>
128 <h3 id="generating-and-pushing-signals-and-data">Generating and pushing signals and data</h3>
129 <p>This of the responsibility of the designer of the signaling agent to establish the processing chain for generating events. In many cases, this can be achieved using I/O or timer or signal events inserted in the main loop. For this case, the AGL framework uses “libsystemd” and provide a way to integrates to the main loop of this library using afb_daemon_get_event_loop. Example:</p>
130 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c">    sdev = afb_daemon_get_event_loop(af_daemon);
131     rc = sd_event_add_io(sdev, &amp;source, fd, EPOLLIN, myfunction, NULL);</code></pre></div>
132 <p>In some other cases, the events are coming from D-Bus. In that case, the framework also uses “libsystemd” internally to access D-Bus. It provides two methods to get the available D-Bus objects, already existing and bound to the main libsystemd event loop. Use either <strong><em>afb_daemon_get_system_bus</em></strong> or <strong><em>afb_daemon_get_user_bus</em></strong> to get the required instance. Then use functions of “libsystemd” to handle D-Bus.</p>
133 <p>In some rare cases, the generation of the data requires to start a new thread.</p>
134 <p>When a data is generated and ready to be pushed, the signaling agent should call the function <strong><em>afb_event_push</em></strong>. Example:</p>
135 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c">    rc = afb_event_push(event, json);
136     <span class="kw">if</span> (rc == <span class="dv">0</span>) {
137         stop_generating(event);
138         afb_event_drop(event);
139     }</code></pre></div>
140 <p>The function <strong><em>afb_event_push</em></strong> pushes json data to all the subscribers. It then returns the count of subscribers. When the count is zero, there is no subscriber listening for the event. The example above shows that in that case, the signaling agent stops to generate data for the event and delete the event using afb_event_drop. This is one possible option. Other valuable options are: do nothing and continue to generate and push the event or just stop to generate and push the data but keep the event existing.</p>
141 <h3 id="receiving-the-signals">Receiving the signals</h3>
142 <p>Understanding what a client expects when it receives signals, events or data shall be the most important topic of the designer of a signaling agent. The good point here is that because JSON<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> is the exchange format, structured data can be sent in a flexible way.</p>
143 <p>The good design is to allow as much as possible the client to describe what is needed with the goal to optimize the processing to the requirements only.</p>
144 <h3 id="the-exceptional-case-of-wide-broadcast">The exceptional case of wide broadcast</h3>
145 <p>Some data or events have so much importance that they can be widely broadcasted to alert any listening client. Examples of such an alert are:</p>
146 <ul>
147 <li>system is entering/leaving “power safe” mode</li>
148 <li>system is shutting down</li>
149 <li>the car starts/stops moving</li>
150 <li>...</li>
151 </ul>
152 <p>An event can be broadcasted using one of the two following methods: <strong><em>afb_daemon_broadcast_event</em></strong> or <strong><em>afb_event_broadcast</em></strong>.</p>
153 <p>Example 1:</p>
154 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c">    afb_daemon_broadcast_event(afb_daemon, name, json);</code></pre></div>
155 <p>Example 2:</p>
156 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c">    event = afb_daemon_make_event(afb_daemon, name);
157     . . . .
158     afb_event_broadcast(event, json);</code></pre></div>
159 <p>As for other events, the name of events broadcasted using <strong><em>afb_daemon_broadcast_event</em></strong> are automatically prefixed by the framework with API prefix of the binding (signaling agent).</p>
160 <h2 id="reference-of-functions">Reference of functions</h2>
161 <h3 id="function-afb_event-afb_daemon_make_event">Function afb_event afb_daemon_make_event</h3>
162 <p>The function <strong><em>afb_daemon_make_event</em></strong> that is defined as below:</p>
163 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
164 <span class="co"> * Creates an event of &#39;name&#39; and returns it.</span>
165 <span class="co"> * &#39;daemon&#39; MUST be the daemon given in interface when activating the binding.</span>
166 <span class="co"> */</span>
167 <span class="kw">struct</span> afb_event afb_daemon_make_event(<span class="kw">struct</span> afb_daemon daemon, <span class="dt">const</span> <span class="dt">char</span> *name);</code></pre></div>
168 <p>The daemon is the handler to the application framework binder daemon received during initialisation steps of the binding.</p>
169 <p>Calling the function <strong><em>afb_daemon_make_event</em></strong> within the initialisation function <strong><em>afbBindingV1Register</em></strong> will <em>fail</em> because the plugin name is not known at this time.</p>
170 <p>The correct way to create the event at initialisation is to call the function <strong><em>afb_daemon_make_event</em></strong> within the initialisation function <strong><em>afbBindingV1ServiceInit</em></strong>.</p>
171 <h3 id="function-afb_event_push">Function afb_event_push</h3>
172 <p>The function <strong><em>afb_event_push</em></strong> is defined as below:</p>
173 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
174 <span class="co"> * Pushes the &#39;event&#39; with the data &#39;object&#39; to its observers.</span>
175 <span class="co"> * &#39;object&#39; can be NULL.</span>
176 <span class="co"> *</span>
177 <span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for object&#39;.</span>
178 <span class="co"> * Thus, in the case where &#39;object&#39; should remain available after</span>
179 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
180 <span class="co"> *</span>
181 <span class="co"> * Returns the count of clients that received the event.</span>
182 <span class="co"> */</span>
183 <span class="dt">int</span> afb_event_push(<span class="kw">struct</span> afb_event event, <span class="kw">struct</span> json_object *object);</code></pre></div>
184 <p>As the function <strong><em>afb_event_push</em></strong> returns 0 when there is no more subscriber, a binding can remove such unexpected event using the function <strong><em>afb_event_drop</em></strong>.</p>
185 <h3 id="function-afb_event_drop">Function afb_event_drop</h3>
186 <p>The function <strong><em>afb_event_drop</em></strong> is defined as below:</p>
187 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
188 <span class="co"> * Drops the data associated to the event</span>
189 <span class="co"> * After calling this function, the event</span>
190 <span class="co"> * MUST NOT BE USED ANYMORE.</span>
191 <span class="co"> */</span>
192 <span class="dt">void</span> afb_event_drop(<span class="kw">struct</span> afb_event event);</code></pre></div>
193 <h3 id="function-afb_req_subscribe">Function afb_req_subscribe</h3>
194 <p>The function <strong><em>afb_req_subscribe</em></strong> is defined as below:</p>
195 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
196 <span class="co"> * Establishes for the client link identified by &#39;req&#39; a subscription</span>
197 <span class="co"> * to the &#39;event&#39;.</span>
198 <span class="co"> * Returns 0 in case of successful subscription or -1 in case of error.</span>
199 <span class="co"> */</span>
200 <span class="dt">int</span> afb_req_subscribe(<span class="kw">struct</span> afb_req req, <span class="kw">struct</span> afb_event event);</code></pre></div>
201 <p>The subscription adds the client of the request to the list of subscribers to the event.</p>
202 <h3 id="function-afb_req_unsubscribe">Function afb_req_unsubscribe</h3>
203 <p>The function <strong><em>afb_req_unsubscribe</em></strong> is defined as below:</p>
204 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
205 <span class="co"> * Revokes the subscription established to the &#39;event&#39; for the client</span>
206 <span class="co"> * link identified by &#39;req&#39;.</span>
207 <span class="co"> * Returns 0 in case of successful unsubscription or -1 in case of error.</span>
208 <span class="co"> */</span>
209 <span class="dt">int</span> afb_req_unsubscribe(<span class="kw">struct</span> afb_req req, <span class="kw">struct</span> afb_event event);</code></pre></div>
210 <p>The unsubscription removes the client of the request of the list of subscribers to the event. When the list of subscribers to the event becomes empty, the function <strong><em>afb_event_push</em></strong> will return zero.</p>
211 <h3 id="function-afb_event_broadcast">Function afb_event_broadcast</h3>
212 <p>The function <strong><em>afb_event_broadcast</em></strong> is defined as below:</p>
213 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
214 <span class="co"> * Broadcasts widely the &#39;event&#39; with the data &#39;object&#39;.</span>
215 <span class="co"> * &#39;object&#39; can be NULL.</span>
216 <span class="co"> *</span>
217 <span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for &#39;object&#39;.</span>
218 <span class="co"> * Thus, in the case where &#39;object&#39; should remain available after</span>
219 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
220 <span class="co"> *</span>
221 <span class="co"> * Returns the count of clients that received the event.</span>
222 <span class="co"> */</span>
223 <span class="dt">int</span> afb_event_broadcast(<span class="kw">struct</span> afb_event event, <span class="kw">struct</span> json_object *object);</code></pre></div>
224 <p>This uses an existing event (created with <strong><em>afb_daemon_make_event</em></strong>) for broadcasting an event having its name.</p>
225 <h3 id="function-afb_daemon_broadcast_event">Function afb_daemon_broadcast_event</h3>
226 <p>The function <strong><em>afb_daemon_broadcast_event</em></strong> is defined as below:</p>
227 <div class="sourceCode"><pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
228 <span class="co"> * Broadcasts widely the event of &#39;name&#39; with the data &#39;object&#39;.</span>
229 <span class="co"> * &#39;object&#39; can be NULL.</span>
230 <span class="co"> * &#39;daemon&#39; MUST be the daemon given in interface when activating the binding.</span>
231 <span class="co"> *</span>
232 <span class="co"> * For convenience, the function calls &#39;json_object_put&#39; for &#39;object&#39;.</span>
233 <span class="co"> * Thus, in the case where &#39;object&#39; should remain available after</span>
234 <span class="co"> * the function returns, the function &#39;json_object_get&#39; shall be used.</span>
235 <span class="co"> *</span>
236 <span class="co"> * Returns the count of clients that received the event.</span>
237 <span class="co"> */</span>
238 <span class="dt">int</span> afb_daemon_broadcast_event(<span class="kw">struct</span> afb_daemon daemon, <span class="dt">const</span> <span class="dt">char</span> *name, <span class="kw">struct</span> json_object *object);</code></pre></div>
239 <p>The name is given here explicitely. The name is automatically prefixed with the name of the binding. For example, a binding of prefix &quot;xxx&quot; would broadcat the event &quot;xxx/name&quot;.</p>
240 <h2 id="architectural-digressions">Architectural digressions</h2>
241 <p>Based on their dependencies to hardware, signaling agents can be split into 2 categories: low-level signaling agents and high-level signaling agents.</p>
242 <p>Low-level signaling agents are bound to the hardware and focused on interfacing and driving.</p>
243 <p>High-level signaling agent are independent of the hardware and ocused on providing service.</p>
244 <p>This separation (that may in the corner look artificial) aim to help in the systems design. The main idea here is that high-level signaling agents are providing “business logic”, also known as “application logic”, that is proper to the car industry and that can be reused and that can evolve as a foundation for the future of the industry.</p>
245 <p>The implementation of this decomposition may follow 2 paths: strict separation or soft composition.</p>
246 <h3 id="strict-separation">Strict separation</h3>
247 <p>The strict separation implements the modularity composition of signaling agent through the framework. The high-level signaling agent subscribes to the low level signaling agent using the standard client API.</p>
248 <p>Advantages:</p>
249 <ul>
250 <li>Modularity</li>
251 <li>Separation of responsibilities</li>
252 <li>Possible aggregation of multiple sources</li>
253 <li>Soft binding of agent good for maintenance</li>
254 </ul>
255 <p>Drawbacks:</p>
256 <ul>
257 <li>Cost of propagation of data (might serialize)</li>
258 <li>Difficulties to abstract low-level signaling agent or to find a trade-of between abstracting and specializing</li>
259 </ul>
260 <p>The key is modularity versus cost of propagation. It can be partly solved when logical group of signaling agent are launched together in the same binder process. In that particular case, the cost of propagation of data between agents is reduced<a href="#fn2" class="footnoteRef" id="fnref2"><sup>2</sup></a> because there is no serialization.</p>
261 <p>This reduction of the propagation cost (and of the resources used) precludes implementation of strong security between the agents because they share the same memory.</p>
262 <h3 id="soft-composition">Soft composition</h3>
263 <p>The soft composition implements the business logic of high-level signaling agents as libraries that can then be used directly by the low level signaling agents.</p>
264 <p>Advantages:</p>
265 <ul>
266 <li>No propagation: same memory, sharing of native structures</li>
267 </ul>
268 <p>Drawbacks:</p>
269 <ul>
270 <li>Cannot be used for aggregation of several sources</li>
271 <li>Difficulties to abstract low-level signaling agent or to find a trade-of between abstracting and specializing</li>
272 <li>Source code binding not good for maintenance</li>
273 </ul>
274 <section class="footnotes">
275 <hr />
276 <ol>
277 <li id="fn1"><p>There are two aspect in using JSON: the first is the flexible data structure that mixes common types (booleans, numbers, strings, arrays, dictionaries, nulls), the second, is the streaming specification. Streaming is often seen as the bottleneck of using JSON (see http://bjson.org). When the agent share the same process, there is no streaming at all.<a href="#fnref1">↩</a></p></li>
278 <li id="fn2"><p>Within the same process, there is not serialization, the propagation has the cost of wrapping a json data and calling callbacks with the benefit of having a powerful callback manager: the event mechanism of the framework.<a href="#fnref2">↩</a></p></li>
279 </ol>
280 </section>
281 </body>
282 </html>