afb-hreq.c: fix etag size (fixes stack smashing detected by stack protector)
[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 TABLE-OF-CONTENT-HERE
8
9 ## Event
10
11 Message with data propagated from the services to the client and not expecting
12 any reply.
13
14 The current implementation allows to widely broadcast events to all clients.
15
16 ## Level of assurance (LOA)
17
18 This level that can be from 0 to 3 represent the level of
19 assurance that the services can expect from the session.
20
21 The exact definition of the meaning of this levels and of
22 how to use it remains to be achived.
23
24 ## Plugin
25
26 A shared library object intended to be plug to an afb-daemon instance
27 to implement an API.
28
29 ## Request
30
31 A request is an invocation by a client to a method of a plugin using a message
32 transfered through some protocol: HTTP, WebSocket, DBUS... served by afb-daemon
33
34 ## Reply/Response
35
36 This is a message sent to client as the result of the request.
37
38 ## Service
39
40 Service are made of plugins runnning by their side on their binder.
41 It can serve many client. Each one being attached to one session.
42
43 The framework establishes the connection between the services and
44 the clients. Using DBus currently.
45
46 ## Session
47
48 A session is meant to be the unic context of an instance of client, 
49 identifying that instance across requests.
50
51 Each session has an identifier. Session identifier generated by afb-daemon are UUIDs.
52
53 Internally, afb-daemon offers a mechanism to attach data to sessions.
54 When the session is closed or disappears, the data attached to that session
55 are freed.
56
57 ## Token
58
59 The token is an identifier that the the client must give to be authentificated.
60
61 At start, afb-daemon get an initial token. This initial token must be presented
62 incoming client to be authentificated.
63
64 A token is valid only for a period.
65
66 The token must be renewed periodically. When the token is renewed, afb-daemon
67 sends the new token to the client.
68
69 Tokens generated by afb-daemon are UUIDs.
70
71 ## UUID
72
73 It stand for Universal Unic IDentifier.
74
75 Its is designed to create identifier in a way that avoid has much as possible conflicts.
76 It means that if two differents instance create a UUID, the probability that they create the same UUID is very low, near to zero.
77
78 ## x-afb-reqid
79
80 Argument name that can be used with HTTP request.
81 When this argument is given, it is automatically added to the "request" object of the
82 answer.
83
84 ## x-afb-token
85
86 Argument name for giving the token without ambiguity.
87 You can also use the name **token** but it may conflicts with other arguments.
88
89 ## x-afb-uuid
90
91 Argument name for giving explicitely the session identifier without ambiguity.
92 You can also use the name **uuid** but it may conflicts with other arguments.
93