- Download and install Node.JS from the latest stable source or package installer (recommended).
- Download and install MongoDB from the latest stable source. Use
bin/mongod
to start a local DB server in the background. - Download and install Redis. Do something like this to start the Redis server via a launch daemon, or just do
redis-server
whenever developing. - Download and install ØMQ.
- Install application dependencies with
npm install
. This will install everything specified inpackage.json
. - Install the frontend builder globally
npm install grunt-cli -g
- Install
nodemon
globally withnpm install nodemon -g
. Usenodemon
in place ofnode
to restart your local web server whenever changes are made... very handy. - Now you can start your local web server with
nodemon main.js
. - Clone island-pubsub.
- Install island-pubsub dependencies with
npm install
. - Start island-pubsub with
node start.js
.
Island is now running at http://localhost:8080/
.
- The mainline development branch for Island is called
develop
. - Features are developed in feature branches. Try to work against a Github issue.
- JSHint all files using Island's .jshintrc file.
- When ready, rebase the feature branch onto
develop
, open a Github pull request, and request a review from another Island developer. - Once reviewed, merge and close the pull request.
- Deployment rules
- Devleopment server
- Testing rules
Releases are deployed with tags via CI:
$ npm run release
This will bump version, create and push a tag, build and upload the frontend to S3, and push a new app version to EBS.
Check that your new version of Island is running at https://www.island.io
.
That's it!
Search is done on a redis instance. Any search string is inserted into a Redis sorted set with the format string::id
. Search is then accomplished by doing a lexicographical comparison on the query. For example, searching for sp
will return any search entry that begins with sp
such as speed
and spit
.
We index of posts, ticks, members, crags and ascents across their names and tags. Entries into the redis cluster are automatically stemmed.
The architecture for search doesn't allow for removal of entries very easily (would need to search the sorted set for an entry which is difficult to do in Redis). Because removal is rare, a good solution is to just re-index nightly. This can be accomplished by installing Node where the Redis instance is located and running a cron job like below.
0 3 * * * NODE_ENV=production bash -c 'time /home/ec2-user/island-app/util/index.js' >> /var/log/index.js 2>&1
Grades are stored internally as an index into a grade map. Grades are converted to their text representations (V3, 5.12a etc) on the client.
When an ascent is created, it is assigned a grade by the creator. Every tick that is sent adds to an overall grade consensus. The grade that appears the most in the consensus is the official Island grade. In this way, grades are dynamic and reflect the growing consensus of Island users. If two grades have equal consensus, the earlier grade is considered first. Any given Island user may only suggest a grade for an ascent once. The only exception is when the grade is first assigned to the ascent, which has no author designated.