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