Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ianbarber/Yourls-SimpleDB-Clickqueue
A YouRLS plugin for using SimpleDB as a buffer for incoming YouRLs clicks
https://github.com/ianbarber/Yourls-SimpleDB-Clickqueue
Last synced: 2 months ago
JSON representation
A YouRLS plugin for using SimpleDB as a buffer for incoming YouRLs clicks
- Host: GitHub
- URL: https://github.com/ianbarber/Yourls-SimpleDB-Clickqueue
- Owner: ianbarber
- License: bsd-2-clause
- Created: 2012-05-17T13:00:30.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-05-17T13:03:01.000Z (over 12 years ago)
- Last Synced: 2024-08-02T06:17:11.479Z (5 months ago)
- Language: PHP
- Size: 93.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - SimpleDB Clickqueue - Queue clicks to Amazon SimpleDB before processing. This allows using a regular MySQL store even in the face of a high frequency of writes, without concern of connection limit overflow. Clicks are inserted later into the database via an import job. (Plugins / S)
README
A [YouRLs](http://yourls.org/) plugin to queue clicks to Amazon SimpleDB before processing. This allows using a regular MySQL store even in the face of a high frequency of writes, without concern of connection limit overflow. Clicks are inserted later into the database via an import job.
Install
=======Ensure that the AWS PHP Client is installed: http://aws.amazon.com/sdkforphp/
To install the plugin itself copy the plugins/sdblog folder to your plugins folder (usually user/plugins).
Configuration
=======To access SimpleDB you will need to include your AWS key and secret key, available from the AWS console. These should be defined in your YouRLs config.php
define('AWS_KEY', 'KEY_GOES_HERE');
define('AWS_SECRET_KEY', 'SECRET_KEY_HERE');
You can additionally define the region to run in and the domain (database name) for SimpleDB with the following parameters:define('SDB_REGION', AmazonSDB::REGION_EU_W1);
define('SDB_DOMAIN', 'myqueuetable');
Usage
======The plugin will automatically shunt clicks onto a SimpleDB call. At appropriate points you are
required to run the import.php script in order to pull the click data into the main YouRLS database
for use in generating statistics. This can be done from a cron script, for example*/5 * * * * php /var/www/user/plugins/sdblog/import.php 2>&1 /dev/null
The timing of the script will depend on your need for accuracy in statistics versus tolerance for database writes.