riak - Gitification/gitification GitHub Wiki
Riak implementation use the client riak-js.
For installation documentation of riak see installation-riak.
If you want to clean riak of all buckets/keys concerning gitification use: node lib/riak-clean.js
Implementation
Link and link walking are used for:
- badge attribution, link user and badge
- event definition, link event type and events
- rule definition, rule and event type
Key filters are used for:
- Retrieve the events of a given user and event type
Functions
magicCheck
magicCheck is a magic function which checks for errors after a riak-js call. It should be the first function called in the callback function of riak-js functions calls. When magicCheck returns true, the callback argument has been called and thus the server has already sent the corresponding error to the client.
rc.get(bucket, key, function (err, result, meta) {
if (magicCheck(callback, err, result, meta)) { return; }
...
});
existsLink
existsLink is an utility function which allow to determine if a link exists in a given sets of links. This function is used because apparently to this day riak allows duplicate links to exist which in certain cases this comportment is not desired.