The Preferences Server is a Kettle app that stores user preferences and responds to HTTP requests to retrieve or save preferences.
Note: As mentioned in an e-mail from March 2014, older versions of a preference set are stored by the underlying database system (CouchDB) but there is no API to access these older versions. Hence, a preferences editor for settings expressed in common terms will overwrite an existing preferences set when it saves settings to the server. If it is necessary to preserve any application-specific settings in a preference set, the preferences editor should take measures to combine the (already existing) application-specific settings and the (new) settings that use common terms in a single request to the Preferences Server. See also User Post Request Handler.
The Preferences Server coordinates responses several requests, as described below. For more information on the request handling, see the page for the particular request handler.
|Description||Retrieve the preferences for a particular user|
|Handled by||User Get Request Handler|
|Description||Save or create the preferences for a particular user|
|Handled by||User Post Request Handler|
Running a Preferences Server Locally
By default, a cloud-based Flow Manager will use the online Preferences Server at
http://preferences.gpii.net. In some cases (e.g. if you are developing with a local cloud-based Flow Manager and want to use your own N&P sets), you have to run your own instance of a Preferences Server.
To run the Preferences Server locally:
- tell your Flow Manager to use your own instance of the preferences server by editing
- tell your own instance of the preferences server to run on port 8082, by editing
"port": 8082under kettle.server's options block; then
- run the Flow Manager and the MatchMaker as it is described above; and
- in another console, run:
node node_modules/kettle/lib/init.js gpii/node_modules/preferencesServer/configs/