packaging: Update spec and deb packaging
[src/app-framework-binder.git] / docs / afb-daemon-vocabulary.md
1 # Vocabulary for AFB-DAEMON
2
3 ## Binding
4
5 A shared library object intended to add a functionality to an afb-daemon
6 instance.  
7 It implements an API and may provide a service.
8
9 Binding made for services can have specific entry point called after
10 initialization and before serving.
11
12 ## Event
13
14 Message with data propagated from the services to the client and not expecting
15 any reply.
16
17 The current implementation allows to widely broadcast events to all clients.
18
19 ## Level of assurance (LOA)
20
21 This level that can be from 0 to 3 represent the level of
22 assurance that the services can expect from the session.
23
24 The exact definition of the meaning of these levels and how to use it remains to
25 be achieved.
26
27 ## Plugin
28
29 Old name for binding, see binding.
30
31 ## Request
32
33 A request is an invocation by a client to a binding method using a message
34 transferred through some protocol:
35
36 - HTTP
37 - WebSocket
38 - DBUS
39 - ...
40
41 and served by ***afb-daemon***
42
43 ## Reply/Response
44
45 This is a message sent to client as the result of the request.
46
47 ## Service
48
49 Service are made of bindings running by their side on their binder.  
50 It can serve many client.  
51 Each one attached to one session.
52
53 The framework establishes connection between the services and the clients.  
54 Using DBus currently but other protocols are considered.
55
56 ## Session
57
58 A session is meant to be the unique instance context of a client,
59 which identify that instance across requests.
60
61 Each session has an identifier.  
62 Session identifier generated by afb-daemon are UUIDs.
63
64 Internally, afb-daemon offers a mechanism to attach data to sessions.  
65 When the session is closed or disappears, the data attached to that session
66 are freed.
67
68 ## Token
69
70 The token is an identifier that the client must give to be authenticated.
71
72 At start, afb-daemon get an initial token.  
73 This initial token must be presented by incoming client to be authenticated.
74
75 A token is valid only for a period.
76
77 The token must be renewed periodically.  
78 When the token is renewed, afb-daemon sends the new token to the client.
79
80 Tokens generated by afb-daemon are UUIDs.
81
82 ## UUID
83
84 It stand for Universal Unique IDentifier.
85
86 It is designed to create identifier in a way that avoid has much as possible
87 conflicts.  
88 It means that if two different instances create an UUID, the
89 probability that they create the same UUID is very low, near to zero.
90
91 ## x-afb-reqid
92
93 Argument name that can be used with HTTP request.  
94 When this argument is given, it is automatically added to the "request" object of the answer.
95
96 ## x-afb-token
97
98 Argument name meant to give the token without ambiguity.  
99 You can also use the name **token** but it may conflicts with others arguments.
100
101 ## x-afb-uuid
102
103 Argument name for giving explicitly the session identifier without ambiguity.  
104 You can also use the name **uuid** but it may conflicts with others arguments.