5 https://git.automotivelinux.org/src/app-framework-binder/plain/docs/afb-overview.md?h=master
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/apis_services/master/app-framework-binder-developer-guides-api-services-book.yml -->
12 The ***binder*** provides the way to connect applications to
13 the services that it needs.
15 It provides a fast way to securely offer APIs to applications
16 written in any language and running almost anywhere.
18 - The ***binder*** is developed for AGL (Automotive Grade Linux) but it is not bound to AGL.
19 - The ***binder*** is the usual name.
20 - The binary is named **afb-daemon**.
21 - The name **afb-daemon** stands for ***Application Framework Binder Daemon***.
23 The word *daemon*, here, denote the fact that the ***binder*** makes witchcraft to
24 connect applications to their expected services. (note: that usually the term of
25 daemon denotes background process but not here).
27 Each ***binder*** **afb-daemon** is in charge to bind one instance of
28 an application or service to the rest of the system, applications and services.
29 Within AGL, the connection between services and/or applications
30 is tuned by the AGL framework and the AGL system.
32 ## The basis of the binder
34 The following figure shows main concepts linked to the ***binder***.
36 <a id="fig-binder-basis"></a>
37 ![Figure: binder basis](pictures/basis.svg)
39 The shown elements are:
41 - The SECURITY CONTEXT
43 The primary intention of any ***binder*** is to provide
44 a secured environment for any application.
45 On AGL, the **security context** is ensured by [Smack]
46 , the security context of the application or service.
50 This is the central element.
51 It makes possible to run HTML5 applications and provides
52 the unified access to APIs provided by the ***bindings***.
54 Running a pure HTML5 application doesn't require any ***binding***.
55 In that case , the ***binder*** acts as a simple HTTP server for
60 A ***binding*** adds one **API** to the ***binder***.
62 An **API** is a set of **verbs** that can be called
63 using either REST over HTTP or a kind of JSON RPC.
65 ***bindings*** are either:
67 - dynamically loaded libraries in the ***binder*** process
68 - remote service running on the same host
69 - remote service running on other hosts
71 When acting as an HTTP server, the binder treats the language
72 settings of the HTTP requests to provide internationalized
73 content as specified by
74 [widget specifications](https://www.w3.org/TR/widgets/#internationalization-and-localization).
77 An ***application*** connects to the binder to get access to
78 the **API** that it provides or to get its HTTP services to access
83 ## Interconnection of binders
85 The AGL framework interprets the **widget/application** manifests
86 to setup the ***bindings*** configuration of the ***binders***.
88 The figure below shows that ***binders*** are interconnected.
90 <a id="fig-binder-interconnection"></a>
91 ![Figure: binder interconnection](pictures/interconnection.svg)
93 The figure shows 4 several **application/service**: **A**, **B**,
96 The application **A** might use an **API** that is shown as a
97 local ***binding*** but that in reality runs within the context
100 The framework AGL takes care of making the plumbing working.