Improves the documentation
[src/app-framework-binder.git] / doc / afb-daemon.md
1 The binder AFB-DAEMON
2 =====================
3     version: 1
4     Date:    30 mai 2016
5     Author:  José Bollo
6
7 TABLE-OF-CONTENT-HERE
8
9 Launching the binder afb-daemon
10 -------------------------------
11
12 The launch options for binder **afb-daemon** are:
13
14           --help
15
16                 Prints help with available options
17
18           --version
19
20                 Display version and copyright
21
22           --verbose
23
24                 Increases the verbosity, can be repeated
25
26           --port=xxxx
27
28                 HTTP listening TCP port  [default 1234]
29
30           --rootdir=xxxx
31
32                 HTTP Root Directory [default $AFBDIR or else $HOME/.AFB]
33
34           --rootbase=xxxx
35
36                 Angular Base Root URL [default /opa]
37
38                 This is used for any application of kind OPA (one page application).
39                 When set, any missing document whose url has the form /opa/zzz
40                 is translated to /opa/#!zzz
41
42           --rootapi=xxxx
43
44                 HTML Root API URL [default /api]
45
46                 The plugins are available within that url.
47
48           --alias=xxxx
49
50                 Maps a path located anywhere in the file system to the
51                 a subdirectory. The syntax for mapping a PATH to the
52                 subdirectory NAME is: --alias=/NAME:PATH.
53
54                 Example: --alias=/icons:/usr/share/icons maps the
55                 content of /usr/share/icons within the subpath /icons.
56
57                 This option can be repeated.
58
59           --apitimeout=xxxx
60
61                 Plugin API timeout in seconds [default 20]
62
63                 Defines how many seconds maximum a method is allowed to run.
64                 0 means no limit.
65
66           --cntxtimeout=xxxx
67
68                 Client Session Timeout in seconds [default 3600]
69
70           --cache-eol=xxxx
71
72                 Client cache end of live [default 100000 that is 27,7 hours]
73
74           --sessiondir=xxxx
75
76                 Sessions file path [default rootdir/sessions]
77
78           --ldpaths=xxxx
79
80                 Load Plugins from given paths separated by colons
81                 as for dir1:dir2:plugin1.so:... [default = $libdir/afb]
82
83                 You can mix path to directories and to plugins.
84                 The sub-directories of the given directories are searched
85                 recursively.
86
87                 The plugins are the files terminated by '.so' (the extension
88                 so denotes shared object) that contain the public entry symbol.
89
90           --plugin=xxxx
91
92                 Load the plugin of given path.
93
94           --token=xxxx
95
96                 Initial Secret token to authenticate.
97
98                 If not set, no client can authenticate.
99
100                 If set to the empty string, then any initial token is accepted.
101
102           --mode=xxxx
103
104                 Set the mode: either local, remote or global.
105
106                 The mode indicate if the application is run locally on the host
107                 or remotely through network.
108
109           --readyfd=xxxx
110
111                 Set the #fd to signal when ready
112
113                 If set, the binder afb-daemon will write "READY=1\n" on the file
114                 descriptor whose number if given (/proc/self/fd/xxx).
115
116           --dbus-client=xxxx
117
118                 Transparent binding to a binder afb-daemon service through dbus.
119
120                 It creates an API of name xxxx that is implemented remotely
121                 and queried via DBUS.
122
123           --dbus-server=xxxx
124
125                 Provides a binder afb-daemon service through dbus.
126
127                 The name xxxx must be the name of an API defined by a plugin.
128                 This API is exported through DBUS.
129
130           --foreground
131
132                 Get all in foreground mode (default)
133
134           --daemon
135
136                 Get all in background mode
137
138
139 Working with afb-daemon
140 -----------------------
141
142
143
144 Future of afb-daemon
145 --------------------
146
147 - Integration of the protocol JSON-RPC for the websockets.
148
149 - The binder afb-daemon would launch the applications directly.
150
151 - The current setting of mode (local/remote/global) might be reworked to a
152 mechanism for querying configuration variables.
153
154 - Implements "one-shot" initial token. It means that after its first
155 authenticated use, the initial token is removed and no client can connect
156 anymore.
157
158