afb-apiset: Fix start of apis
[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 points called after
10 initialization and before serving.
11
12 ## Event
13
14 Messages 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 ## Request
28
29 A request is an invocation by a client to a binding method using a message
30 transferred through some protocol:
31
32 - HTTP
33 - WebSocket
34 - ...
35
36 and served by ***afb-daemon***
37
38 ## Reply/Response
39
40 This is a message sent to client as the result of the request.
41
42 ## Service
43
44 Service are made of bindings running on a binder
45 The binder is in charge of connecting services and applications.
46 A service can serve many clients.
47
48 The framework establishes connection between the services and the clients.
49 Using sockets currently but other protocols are considered.
50
51 The term of service is tightly bound to the notion of API.
52
53 ## Session
54
55 A session is meant to be the unique instance context of a client,
56 which identify that instance across requests.
57
58 Each session has an identifier.
59 Session identifier generated by afb-daemon are UUIDs.
60 A client can present its own session id.
61
62 Internally, afb-daemon offers a mechanism to attach data to sessions.
63 When a session is closed or disappears, data attached to that session
64 are freed.
65
66 ## Token
67
68 The token is an identifier that the client must give to be authenticated.
69
70 At start, afb-daemon get an initial token.  
71 This initial token must be presented by incoming client to be authenticated.
72
73 A token is valid only for a period.
74
75 The token must be renewed periodically.  
76 When the token is renewed, afb-daemon sends the new token to the client.
77
78 Tokens generated by afb-daemon are UUIDs.
79
80 ## UUID
81
82 It stand for Universal Unique IDentifier.
83
84 It is designed to create identifier in a way that avoid has much as possible
85 conflicts.  
86 It means that if two different instances create an UUID, the
87 probability that they create the same UUID is very low, near to zero.
88
89 ## x-afb-reqid
90
91 Argument name that can be used with HTTP request.  
92 When this argument is given, it is automatically added to the "request" object of the answer.
93
94 ## x-afb-token
95
96 Argument name meant to give the token without ambiguity.  
97 You can also use the name **token** but it may conflicts with others arguments.
98
99 ## x-afb-uuid
100
101 Argument name for giving explicitly the session identifier without ambiguity.  
102 You can also use the name **uuid** but it may conflicts with others arguments.