Simplified doc-site generation
[AGL/documentation.git] / docs / 4_APIs_and_Services / 4.3_Application_Framework_Binder / 0_Overview / 0_Overview.md
1 ---
2 edit_link: ''
3 title: Overview
4 origin_url: >-
5   https://git.automotivelinux.org/src/app-framework-binder/plain/docs/afb-overview.md?h=master
6 ---
7
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 -->
9
10 # Binder Overview
11
12 The ***binder*** provides the way to connect applications to
13 the services that it needs.
14
15 It provides a fast way to securely offer APIs to applications
16 written in any language and running almost anywhere.
17
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***.
22
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).
26
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.
31
32 ## The basis of the binder
33
34 The following figure shows main concepts linked to the ***binder***.
35
36 <a id="fig-binder-basis"></a>
37 ![Figure: binder basis](pictures/basis.svg)
38
39 The shown elements are:
40
41 - The SECURITY CONTEXT
42
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.
47
48 - The BINDER
49
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***.
53
54   Running a pure HTML5 application doesn't require any ***binding***.  
55   In that case , the ***binder*** acts as a simple HTTP server for
56   the web runtime.
57
58 - The BINDINGs
59
60   A ***binding*** adds one **API** to the ***binder***.
61
62   An **API** is a set of **verbs** that can be called
63   using either REST over HTTP or a kind of JSON RPC.
64
65   ***bindings*** are either:
66
67   - dynamically loaded libraries in the ***binder*** process
68   - remote service running on the same host
69   - remote service running on other hosts
70
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).
75 - The APPLICATION
76
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
79   resources.
80
81 <!-- pagebreak -->
82
83 ## Interconnection of binders
84
85 The AGL framework interprets the **widget/application** manifests
86 to setup the ***bindings*** configuration of the ***binders***.
87
88 The figure below shows that ***binders*** are interconnected.
89
90 <a id="fig-binder-interconnection"></a>
91 ![Figure: binder interconnection](pictures/interconnection.svg)
92
93 The figure shows 4 several **application/service**: **A**, **B**,
94 **C** and **D**.
95
96 The application **A** might use an **API** that is shown as a
97 local ***binding*** but that in reality runs within the context
98 of **D**.
99
100 The framework AGL takes care of making the plumbing working.