-
Notifications
You must be signed in to change notification settings - Fork 3
Getting Started
ResourceSync PuSH can be obtained here.
To install, Python version >= 2.6 is required. The installation process entails decompressing the downloaded file and executing the setup script.
To decompress zip files, run the following from the command line.
$ unzip resourcesync_push-<version>.zipTo decompress tarballs
$ tar xvzf resourcesync_push-<version>.tar.gzTo install ResourceSync PuSH, run the following command.
Note: Administrative privileges are needed to install.
$ cd resourcesync_push-<version>
$ sudo python setup.py installThe install script, in addition to installing the ResourceSync PuSH library in Python's site-packages folder, will also install configuration files and binaries.
The binary files to start the servers will be installed in the system path (usually in the folder /usr/bin/ or /usr/local/bin).
To start the publisher, type:
$ resourcesync_pubFor starting the hub:
$ resourcesync_hubFor the subscriber:
$ resourcesync_subBy default, the hub will listen to the HTTP port 8000, the publisher 8100 and the subscriber will listen to 8200. Each of the servers will start with 8 processes and each of the processes with 2 threads each. These parameters can be changed in the configuration files, which can be found in the folder /etc/resourcesync_push/. Each of the modules above has it's own configuration file. The configuration files have the same file name as the module name, appended with the extension .ini as shown below.
$ ls -l /etc/resourcesync_push/
total 32
-rw-r--r-- 1 root wheel 399 Apr 17 13:08 resourcesync_hub.ini
-rw-r--r-- 1 root wheel 289 Apr 17 13:08 resourcesync_pub.ini
-rw-r--r-- 1 root wheel 1176 Apr 17 13:08 resourcesync_push.ini
-rw-r--r-- 1 root wheel 291 Apr 17 13:08 resourcesync_sub.iniAn example configuration file looks like:
$ cat /etc/resourcesync_push/resourcesync_hub.ini[uwsgi]
pythonpath = $PYTHONPATH
http = :8000
processes = 8
threads = 2
module = resourcesync_push.hub.hub
callable = application
master = true
limit-post = 2097152The parameters pythonpath, http, processes and threads can all be configured depending on the requirements. The parameter http denotes the HTTP port that the module must use and pythonpath is the path to the Python site-packages folder.
NOTE: The parameters module and callable should not be changed and doing so will break the installation.
More configuration parameters for uWSGI can be found here.
The three configuration files: resourcesync_pub.ini, resourcesync_hub.ini, resourcesync_sub.ini, help configure how the HTTP servers must start and run. The fourth configuration file resourcesync_push.ini, explained below, helps configure the PubSubHubbub and ResourceSync specific parameters.
The resourcesync_push.ini file is the common configuration file for all the three modules: publisher, hub, and the subscriber. The necessary PubSubHubbub and ResourceSync specific parameters, that are needed for the modules to communicate with one another must be placed in this file. An example file can be found here.
This file contains three main sections with the titles [hub], [publisher] and [subscriber]. Depending on the ResourceSync module that is to be run, the corresponding section will have to be edited. For example, to run a hub, the variables in the section [hub] will have to be updated. Please refer to the individual sections in the documentation for detailed explanation on these parameters.
The Web Server Integration section of the uWSGI documentation provides complete information on the deployment choices available.