Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Riak-powered Ajax-polling chatroom. Not for production use!

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 yak
Octocat-spinner-32 yakmr
Octocat-spinner-32 README.textile
Octocat-spinner-32 load.sh
README.textile

yakriak

A simple web-based chatroom app. Designed as a proof-of-concept for Ben Black’s Riak training at VelocityConf 2010.

Features / Problems

  • Everything is stored and served out of Riak. No special abstraction. Take that, couchapps!
  • Browser Compatibility:
    • WebKit-based (Chrome, Safari)
    • Firefox 3.6 and 4.0
    • MSIE8, maybe 7 (tested via 8’s IE7 mode)
  • Remembers your login credentials via unencrypted cookies (not transmitted).
  • Randomizes the polling interval to avoid thundering-herd effects.
  • Uses full-bucket map-reduce, so won’t perform well at huge numbers of messages. Future work could change to use key-filters but would still incur the price of list-keys.
  • Your email address will be used for Gravatar, should you decide not to remain anonymous.

Setup

  1. Startup Riak locally on the standard HTTP port (8098).
  2. Join your local node to the cluster, if necessary.
  3. Run the load.sh bash script.
  4. Visit http://127.0.0.1:8098/riak/yak/index.html

Learn more

Read the source! The majority of the work is in yak/yakriak.js, and the map and reduce functions in the yakmr/ directory.

Credit where credit’s due

  • jQuery 1.4.2 (jQuery team)
  • riak-javascript-client (Basho)
  • json2.js (Douglas Crockford)
  • cookie.js (Maxime Haineault, John W. Long)
  • md5.js (Paul Johnston)
Something went wrong with that request. Please try again.