Permalink
Browse files

import

  • Loading branch information...
0 parents commit db66c33b42aa2c963009f5b2b32f8d16c8467ddd justin committed Aug 7, 2009
Showing with 32,560 additions and 0 deletions.
  1. +6 −0 Emakefile
  2. +178 −0 LICENSE
  3. +31 −0 Makefile
  4. +10 −0 NOTICE
  5. +158 −0 README
  6. +25 −0 TODO
  7. +105 −0 client_lib/jiak.js
  8. +132 −0 client_lib/jiak.py
  9. +11 −0 config/riak-demo.erlenv
  10. +12 −0 config/riak-dets.erlenv
  11. +16 −0 config/riak-ets-jiak.erlenv
  12. +12 −0 config/riak-osmos.erlenv
  13. +11 −0 config/riak.erlenv
  14. +6 −0 demo/stickynotes/Emakefile
  15. +19 −0 demo/stickynotes/Makefile
  16. +53 −0 demo/stickynotes/README
  17. +1 −0 demo/stickynotes/deps/riak
  18. 0 demo/stickynotes/ebin/.hg_dummy
  19. +182 −0 demo/stickynotes/priv/www/css/application.css
  20. BIN demo/stickynotes/priv/www/images/add.png
  21. BIN demo/stickynotes/priv/www/images/add_hover.png
  22. BIN demo/stickynotes/priv/www/images/color_picker.png
  23. BIN demo/stickynotes/priv/www/images/color_picker_hover.png
  24. BIN demo/stickynotes/priv/www/images/postit_blue.png
  25. BIN demo/stickynotes/priv/www/images/postit_green.png
  26. BIN demo/stickynotes/priv/www/images/postit_pink.png
  27. BIN demo/stickynotes/priv/www/images/postit_yellow.png
  28. BIN demo/stickynotes/priv/www/images/trash.png
  29. BIN demo/stickynotes/priv/www/images/trash_active.png
  30. BIN demo/stickynotes/priv/www/images/trash_hover.png
  31. +61 −0 demo/stickynotes/priv/www/index.html
  32. BIN demo/stickynotes/priv/www/js/.application.js.swp
  33. +183 −0 demo/stickynotes/priv/www/js/application.js
  34. +105 −0 demo/stickynotes/priv/www/js/jiak.js
  35. +32 −0 demo/stickynotes/priv/www/js/jquery-1.2.6.min.js
  36. +79 −0 demo/stickynotes/priv/www/js/jquery-ui-personalized-1.6rc2.min.js
  37. +475 −0 demo/stickynotes/priv/www/js/json2.js
  38. +12 −0 demo/stickynotes/riak-config.erlenv
  39. +124 −0 demo/stickynotes/src/groups.erl
  40. +152 −0 demo/stickynotes/src/notes.erl
  41. +16 −0 demo/stickynotes/src/stickynotes.app
  42. +39 −0 demo/stickynotes/src/stickynotes.erl
  43. +22 −0 demo/stickynotes/src/stickynotes_app.erl
  44. +84 −0 demo/stickynotes/src/stickynotes_deps.erl
  45. +39 −0 demo/stickynotes/src/stickynotes_resource.erl
  46. +83 −0 demo/stickynotes/src/stickynotes_sup.erl
  47. +3 −0 demo/stickynotes/start-dev.sh
  48. +3 −0 demo/stickynotes/start.sh
  49. +7 −0 deps/webmachine/.hgignore
  50. +6 −0 deps/webmachine/Emakefile
  51. +178 −0 deps/webmachine/LICENSE
  52. +22 −0 deps/webmachine/Makefile
  53. +14 −0 deps/webmachine/THANKS
  54. +6 −0 deps/webmachine/demo/Emakefile
  55. +19 −0 deps/webmachine/demo/Makefile
  56. 0 deps/webmachine/demo/ebin/.hg_empty_dir
  57. +9 −0 deps/webmachine/demo/mochiweb/LICENSE
  58. +11 −0 deps/webmachine/demo/mochiweb/Makefile
  59. +1 −0 deps/webmachine/demo/mochiweb/README
  60. 0 deps/webmachine/demo/mochiweb/ebin/.hg_empty_dir
  61. +5 −0 deps/webmachine/demo/mochiweb/priv/skel/Makefile
  62. +8 −0 deps/webmachine/demo/mochiweb/priv/skel/priv/www/index.html
  63. +9 −0 deps/webmachine/demo/mochiweb/priv/skel/src/Makefile
  64. +14 −0 deps/webmachine/demo/mochiweb/priv/skel/src/skel.app
  65. +30 −0 deps/webmachine/demo/mochiweb/priv/skel/src/skel.erl
  66. +1 −0 deps/webmachine/demo/mochiweb/priv/skel/src/skel.hrl
  67. +22 −0 deps/webmachine/demo/mochiweb/priv/skel/src/skel_app.erl
  68. +84 −0 deps/webmachine/demo/mochiweb/priv/skel/src/skel_deps.erl
  69. +54 −0 deps/webmachine/demo/mochiweb/priv/skel/src/skel_sup.erl
  70. +43 −0 deps/webmachine/demo/mochiweb/priv/skel/src/skel_web.erl
  71. +3 −0 deps/webmachine/demo/mochiweb/priv/skel/start-dev.sh
  72. +3 −0 deps/webmachine/demo/mochiweb/priv/skel/start.sh
  73. +46 −0 deps/webmachine/demo/mochiweb/priv/skel/support/include.mk
  74. +27 −0 deps/webmachine/demo/mochiweb/scripts/new_mochiweb.erl
  75. +20 −0 deps/webmachine/demo/mochiweb/src/Makefile
  76. +426 −0 deps/webmachine/demo/mochiweb/src/mochifmt.erl
  77. +30 −0 deps/webmachine/demo/mochiweb/src/mochifmt_records.erl
  78. +23 −0 deps/webmachine/demo/mochiweb/src/mochifmt_std.erl
  79. +75 −0 deps/webmachine/demo/mochiweb/src/mochihex.erl
  80. +525 −0 deps/webmachine/demo/mochiweb/src/mochijson.erl
  81. +597 −0 deps/webmachine/demo/mochiweb/src/mochijson2.erl
  82. +289 −0 deps/webmachine/demo/mochiweb/src/mochinum.erl
  83. +32 −0 deps/webmachine/demo/mochiweb/src/mochiweb.app
  84. +110 −0 deps/webmachine/demo/mochiweb/src/mochiweb.erl
  85. +20 −0 deps/webmachine/demo/mochiweb/src/mochiweb_app.erl
  86. +295 −0 deps/webmachine/demo/mochiweb/src/mochiweb_charref.erl
  87. +250 −0 deps/webmachine/demo/mochiweb/src/mochiweb_cookies.erl
  88. +31 −0 deps/webmachine/demo/mochiweb/src/mochiweb_echo.erl
  89. +186 −0 deps/webmachine/demo/mochiweb/src/mochiweb_headers.erl
  90. +880 −0 deps/webmachine/demo/mochiweb/src/mochiweb_html.erl
  91. +142 −0 deps/webmachine/demo/mochiweb/src/mochiweb_http.erl
  92. +429 −0 deps/webmachine/demo/mochiweb/src/mochiweb_multipart.erl
  93. +790 −0 deps/webmachine/demo/mochiweb/src/mochiweb_request.erl
  94. +56 −0 deps/webmachine/demo/mochiweb/src/mochiweb_response.erl
  95. +71 −0 deps/webmachine/demo/mochiweb/src/mochiweb_skel.erl
  96. +248 −0 deps/webmachine/demo/mochiweb/src/mochiweb_socket_server.erl
  97. +34 −0 deps/webmachine/demo/mochiweb/src/mochiweb_sup.erl
  98. +579 −0 deps/webmachine/demo/mochiweb/src/mochiweb_util.erl
  99. +124 −0 deps/webmachine/demo/mochiweb/src/reloader.erl
  100. +39 −0 deps/webmachine/demo/mochiweb/support/include.mk
  101. 0 deps/webmachine/demo/priv/.hg_empty_dir
  102. +157 −0 deps/webmachine/demo/src/demo_fs_resource.erl
  103. +14 −0 deps/webmachine/demo/src/webmachine_demo.app
  104. +27 −0 deps/webmachine/demo/src/webmachine_demo.erl
  105. +1 −0 deps/webmachine/demo/src/webmachine_demo.hrl
  106. +20 −0 deps/webmachine/demo/src/webmachine_demo_app.erl
  107. +49 −0 deps/webmachine/demo/src/webmachine_demo_resource.erl
  108. +42 −0 deps/webmachine/demo/src/webmachine_demo_sup.erl
  109. +3 −0 deps/webmachine/demo/start.sh
  110. +9 −0 deps/webmachine/deps/mochiweb/LICENSE
  111. +11 −0 deps/webmachine/deps/mochiweb/Makefile
  112. +1 −0 deps/webmachine/deps/mochiweb/README
  113. 0 deps/webmachine/deps/mochiweb/ebin/.hg_empty_dir
  114. +5 −0 deps/webmachine/deps/mochiweb/priv/skel/Makefile
  115. +8 −0 deps/webmachine/deps/mochiweb/priv/skel/priv/www/index.html
  116. +9 −0 deps/webmachine/deps/mochiweb/priv/skel/src/Makefile
  117. +14 −0 deps/webmachine/deps/mochiweb/priv/skel/src/skel.app
  118. +30 −0 deps/webmachine/deps/mochiweb/priv/skel/src/skel.erl
  119. +1 −0 deps/webmachine/deps/mochiweb/priv/skel/src/skel.hrl
  120. +22 −0 deps/webmachine/deps/mochiweb/priv/skel/src/skel_app.erl
  121. +84 −0 deps/webmachine/deps/mochiweb/priv/skel/src/skel_deps.erl
  122. +54 −0 deps/webmachine/deps/mochiweb/priv/skel/src/skel_sup.erl
  123. +43 −0 deps/webmachine/deps/mochiweb/priv/skel/src/skel_web.erl
  124. +3 −0 deps/webmachine/deps/mochiweb/priv/skel/start-dev.sh
  125. +3 −0 deps/webmachine/deps/mochiweb/priv/skel/start.sh
  126. +46 −0 deps/webmachine/deps/mochiweb/priv/skel/support/include.mk
  127. +27 −0 deps/webmachine/deps/mochiweb/scripts/new_mochiweb.erl
  128. +20 −0 deps/webmachine/deps/mochiweb/src/Makefile
  129. +426 −0 deps/webmachine/deps/mochiweb/src/mochifmt.erl
  130. +30 −0 deps/webmachine/deps/mochiweb/src/mochifmt_records.erl
  131. +23 −0 deps/webmachine/deps/mochiweb/src/mochifmt_std.erl
  132. +75 −0 deps/webmachine/deps/mochiweb/src/mochihex.erl
  133. +525 −0 deps/webmachine/deps/mochiweb/src/mochijson.erl
  134. +597 −0 deps/webmachine/deps/mochiweb/src/mochijson2.erl
  135. +289 −0 deps/webmachine/deps/mochiweb/src/mochinum.erl
  136. +32 −0 deps/webmachine/deps/mochiweb/src/mochiweb.app
  137. +110 −0 deps/webmachine/deps/mochiweb/src/mochiweb.erl
  138. +20 −0 deps/webmachine/deps/mochiweb/src/mochiweb_app.erl
  139. +295 −0 deps/webmachine/deps/mochiweb/src/mochiweb_charref.erl
  140. +250 −0 deps/webmachine/deps/mochiweb/src/mochiweb_cookies.erl
  141. +31 −0 deps/webmachine/deps/mochiweb/src/mochiweb_echo.erl
  142. +186 −0 deps/webmachine/deps/mochiweb/src/mochiweb_headers.erl
  143. +880 −0 deps/webmachine/deps/mochiweb/src/mochiweb_html.erl
  144. +142 −0 deps/webmachine/deps/mochiweb/src/mochiweb_http.erl
  145. +429 −0 deps/webmachine/deps/mochiweb/src/mochiweb_multipart.erl
  146. +790 −0 deps/webmachine/deps/mochiweb/src/mochiweb_request.erl
  147. +56 −0 deps/webmachine/deps/mochiweb/src/mochiweb_response.erl
  148. +71 −0 deps/webmachine/deps/mochiweb/src/mochiweb_skel.erl
  149. +248 −0 deps/webmachine/deps/mochiweb/src/mochiweb_socket_server.erl
  150. +34 −0 deps/webmachine/deps/mochiweb/src/mochiweb_sup.erl
  151. +579 −0 deps/webmachine/deps/mochiweb/src/mochiweb_util.erl
  152. +124 −0 deps/webmachine/deps/mochiweb/src/reloader.erl
  153. +39 −0 deps/webmachine/deps/mochiweb/support/include.mk
  154. BIN deps/webmachine/docs/http-headers-status-v3.png
  155. 0 deps/webmachine/ebin/.hg_empty_dir
  156. +8 −0 deps/webmachine/include/webmachine.hrl
  157. +7 −0 deps/webmachine/include/wm_reqdata.hrl
  158. +6 −0 deps/webmachine/priv/skel/Emakefile
  159. +19 −0 deps/webmachine/priv/skel/Makefile
  160. 0 deps/webmachine/priv/skel/deps/.empty
  161. 0 deps/webmachine/priv/skel/ebin/.empty
  162. +1 −0 deps/webmachine/priv/skel/priv/dispatch.conf
  163. +8 −0 deps/webmachine/priv/skel/priv/www/index.html
  164. +14 −0 deps/webmachine/priv/skel/src/skel.app
  165. +32 −0 deps/webmachine/priv/skel/src/skel.erl
  166. +1 −0 deps/webmachine/priv/skel/src/skel.hrl
  167. +22 −0 deps/webmachine/priv/skel/src/skel_app.erl
  168. +84 −0 deps/webmachine/priv/skel/src/skel_deps.erl
  169. +13 −0 deps/webmachine/priv/skel/src/skel_resource.erl
  170. +57 −0 deps/webmachine/priv/skel/src/skel_sup.erl
  171. +3 −0 deps/webmachine/priv/skel/start-dev.sh
  172. +3 −0 deps/webmachine/priv/skel/start.sh
  173. +8 −0 deps/webmachine/priv/www/index.html
  174. +32 −0 deps/webmachine/scripts/new_webmachine.erl
  175. +25 −0 deps/webmachine/src/webmachine.app
  176. +45 −0 deps/webmachine/src/webmachine.erl
  177. +36 −0 deps/webmachine/src/webmachine_app.erl
  178. +618 −0 deps/webmachine/src/webmachine_decision_core.erl
  179. +92 −0 deps/webmachine/src/webmachine_deps.erl
  180. +112 −0 deps/webmachine/src/webmachine_dispatcher.erl
  181. +71 −0 deps/webmachine/src/webmachine_error_handler.erl
  182. +221 −0 deps/webmachine/src/webmachine_logger.erl
  183. +13 −0 deps/webmachine/src/webmachine_logger.hrl
  184. +76 −0 deps/webmachine/src/webmachine_mochiweb.erl
  185. +165 −0 deps/webmachine/src/webmachine_multipart.erl
  186. +210 −0 deps/webmachine/src/webmachine_perf_logger.erl
  187. +178 −0 deps/webmachine/src/webmachine_request.erl
  188. +606 −0 deps/webmachine/src/webmachine_request_srv.erl
  189. +209 −0 deps/webmachine/src/webmachine_resource.erl
  190. +89 −0 deps/webmachine/src/webmachine_skel.erl
  191. +77 −0 deps/webmachine/src/webmachine_sup.erl
  192. +297 −0 deps/webmachine/src/webmachine_util.erl
  193. +363 −0 deps/webmachine/src/wmtrace_resource.erl
  194. +188 −0 deps/webmachine/src/wrq.erl
  195. +3 −0 deps/webmachine/start-dev.sh
  196. +3 −0 deps/webmachine/start.sh
  197. +107 −0 deps/webmachine/trace/wmtrace.css
  198. +713 −0 deps/webmachine/trace/wmtrace.js
  199. +152 −0 doc/architecture.txt
  200. +361 −0 doc/basic-client.txt
  201. +171 −0 doc/basic-mapreduce.txt
  202. +243 −0 doc/basic-setup.txt
  203. +9 −0 doc/overview.edoc
  204. 0 ebin/.hg_dummy_file
  205. 0 priv/.empty_for_hg
  206. +1 −0 riak-env.sh
  207. +92 −0 riak_demo.escript
  208. +8 −0 scripts/make_appfile.sh
  209. +9 −0 src/Makefile
  210. +188 −0 src/chash.erl
  211. +1,026 −0 src/gen_server2.erl
  212. +163 −0 src/jaywalker_resource.erl
  213. +145 −0 src/jiak.erl
  214. +157 −0 src/jiak_client.erl
  215. +60 −0 src/jiak_context.erl
  216. +147 −0 src/jiak_example.erl
  217. +407 −0 src/jiak_object.erl
  218. +725 −0 src/jiak_resource.erl
  219. +47 −0 src/json_pp.erl
  220. +355 −0 src/merkerl.erl
  221. +221 −0 src/priority_queue.erl
  222. +10 −0 src/riak.app.src
  223. +106 −0 src/riak.erl
  224. +92 −0 src/riak_api.erl
  225. +206 −0 src/riak_app.erl
  226. +157 −0 src/riak_backup.erl
  227. +62 −0 src/riak_bucket.erl
  228. +215 −0 src/riak_bucketkeys.erl
  229. +46 −0 src/riak_claim.erl
  230. +171 −0 src/riak_client.erl
  231. +57 −0 src/riak_connect.erl
  232. +70 −0 src/riak_delete.erl
  233. +94 −0 src/riak_dets_backend.erl
  234. +101 −0 src/riak_doorbell.erl
  235. +114 −0 src/riak_ets_backend.erl
  236. +74 −0 src/riak_event_guard.erl
  237. +84 −0 src/riak_event_logger.erl
  238. +86 −0 src/riak_eventer.erl
  239. +87 −0 src/riak_fs_backend.erl
  240. +259 −0 src/riak_get_fsm.erl
  241. +116 −0 src/riak_map_executor.erl
  242. +121 −0 src/riak_map_phase_fsm.erl
  243. +135 −0 src/riak_mapreduce.erl
  244. +182 −0 src/riak_mapreduce_fsm.erl
  245. +351 −0 src/riak_object.erl
  246. +136 −0 src/riak_osmos_backend.erl
  247. +263 −0 src/riak_perftest.erl
  248. +241 −0 src/riak_put_fsm.erl
  249. +91 −0 src/riak_reduce_phase_fsm.erl
  250. +260 −0 src/riak_ring.erl
  251. +145 −0 src/riak_ring_gossiper.erl
  252. +159 −0 src/riak_ring_manager.erl
  253. +57 −0 src/riak_startup.erl
  254. +82 −0 src/riak_sup.erl
  255. +186 −0 src/riak_util.erl
  256. +292 −0 src/riak_vnode.erl
  257. +120 −0 src/riak_vnode_master.erl
  258. +104 −0 src/riak_vnode_sidekick.erl
  259. +60 −0 src/riak_web.erl
  260. +152 −0 src/vclock.erl
  261. +8 −0 start-backup-dump.sh
  262. +9 −0 start-backup-restore.sh
  263. +8 −0 start-eventer.sh
  264. +12 −0 start-fresh.sh
  265. +12 −0 start-join.sh
  266. +13 −0 start-restart.sh
  267. +199 −0 www/arch.html
  268. +277 −0 www/basic-setup.html
  269. +72 −0 www/cap.html
  270. +47 −0 www/contact.html
  271. +28 −0 www/css/style-1c.css
  272. +28 −0 www/css/style.css
  273. +70 −0 www/dev.html
  274. 0 www/edoc/.empty_for_hg
  275. +58 −0 www/eventer.html
  276. +67 −0 www/faq.html
  277. BIN www/images/basho-landscape.gif
  278. BIN www/images/bg.gif
  279. BIN www/images/blankbox.gif
  280. BIN www/images/chash.gif
  281. BIN www/images/easy-ops.gif
  282. BIN www/images/gossip4.gif
  283. BIN www/images/halfblankbox.gif
  284. BIN www/images/more.gif
  285. BIN www/images/site.gif
  286. BIN www/images/splash250.gif
  287. BIN www/images/vclock.gif
  288. +67 −0 www/index.html
  289. +60 −0 www/libs.html
  290. +135 −0 www/mapreduce.html
  291. +72 −0 www/ops.html
  292. +65 −0 www/scale.html
@@ -0,0 +1,6 @@
+% -*- mode: erlang -*-
+{["src/gen_server2.erl", "src/*"],
+ [{i, "include"},
+ {outdir, "ebin"},
+ debug_info]
+}.
@@ -0,0 +1,178 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
@@ -0,0 +1,31 @@
+ERL ?= erl
+EBIN_DIRS := $(wildcard deps/*/ebin)
+APP := riak
+
+all: webmachine erl ebin/$(APP).app
+
+erl:
+ @$(ERL) -pa ebin -pa $(EBIN_DIRS) -noinput +B \
+ -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
+
+webmachine:
+ @(cd deps/webmachine;$(MAKE))
+
+docs:
+ @erl -noshell -run edoc_run application '$(APP)' '"."' '[]'
+ @cp -r doc/* www/edoc
+ @cp README www/
+ @cp LICENSE www/
+ @cp TODO www/
+
+clean:
+ @echo "removing:"
+ @rm -fv ebin/*.beam ebin/*.app
+
+ebin/$(APP).app: src/$(APP).app.src
+ @echo "generating ebin/riak.app"
+ @bash scripts/make_appfile.sh >ebin/riak.app
+
+dialyzer: erl
+ @dialyzer -Wno_return -c ebin/ | tee priv/log/dialyzer.log
+
@@ -0,0 +1,10 @@
+Riak
+Copyright 2007-2009 Basho Technologies
+
+This product contains code developed at Basho Technologies.
+(http://www.basho.com/)
+
+The gen_server2 and priority_queue modules are provided
+by LShift Ltd, and can also be found in the RabbitMQ
+sources at http://www.rabbitmq.com/
+
@@ -0,0 +1,158 @@
+Welcome to Riak.
+
+Riak is a distributed, decentralized data storage system.
+
+Below, you will find the "quick start" directions for setting up and
+using Riak. For more information, browse the following files:
+
+ README: this file
+ TODO: a list of improvements planned for Riak
+ LICENSE: the license under which Riak is released
+ *.sh: various startup scripts
+ riak_demo.escript: demo for a base level of Riak functionality
+ doc/
+ basic-setup.txt: slightly more detail on setting up Riak
+ basic-client.txt: slightly more detail on using Riak
+ architecture.txt: details about the underlying design of Riak,
+ and how this affects applications using it
+ index.html: the root of the edoc output of 'make docs'
+ src/
+ *.erl: the source for Riak (it's friendly)
+ config/
+ *.erlenv: example configuration files
+
+
+Quick Start
+---
+
+This section assumes that you have copy of the Riak source tree at
+$RIAK. You should have created this by cloning a repo or expanding
+a tarball from somewhere.
+
+The quick start goes like this:
+
+1. Build Riak
+2. Start the Riak server
+3. Connect a client and store/fetch data
+
+
+1. Build Riak
+-
+Assuming you have a working Erlang installation, building Riak should
+be as simple as:
+
+$ cd $RIAK
+$ make
+
+
+2. Start the Riak server - Assuming no errors were generated in the
+build step, $RIAK/config/riak-demo.erlenv and replace all instances of
+$RIAK with the directory in which $RIAK is installed. For example,
+change:
+
+{riak_heart_command, "(cd $RIAK; ./start-restart.sh $RIAK/config/riak-demo.erlenv)"}.
+
+to:
+
+{riak_heart_command, "(cd /usr/local/riak; ./start-restart.sh /usr/local/riak/config/riak-demo.erlenv)"}.
+
+Then start riak:
+
+$ cd $RIAK
+$ ./start-fresh.sh config/riak-demo.erlenv
+
+The server should start, then background itself, leaving you at a
+command prompt.
+
+At this point, you can use riak_demo.escript to ensure that Riak is
+functioning:
+
+$ ./riak_demo.escript config/riak-demo.erlenv
+Attempting to connect to 127.0.0.1:9000 with cookie riak_demo_cookie...
+Connected successfully
+Looking for pre-existing object at {riak_demo, "demo"}...
+ No pre-existing object found, creating new
+Storing object with new value...
+ Written successfully
+Fetching object at {riak_demo, "demo"}...
+ Fetched successfully
+ Object contained correct value
+SUCCESS
+
+If riak_demo prints no "Error: ..." messages, and instead prints
+"SUCCESS", then Riak is working.
+
+
+3. Connect a client
+-
+Assuming no errors were generated during the server start step, a
+simple client interaction will look like:
+
+$ erl -name riaktest@127.0.0.1 -pa $RIAK/ebin
+
+(riaktest@127.0.0.1)1> %% connect to Riak
+(riaktest@127.0.0.1)1> {ok, C} = riak:client_connect("127.0.0.1", 9000, riak_demo_cookie).
+{ok,{riak_client,'riakdemo@127.0.0.1',
+ "20090722191020-riaktest@127.0.0.1-riakdemo@127.0.0.1-266664"}}
+
+riaktest@127.0.0.1)2> %% Create a shopping list for bread at /groceries/mine
+riaktest@127.0.0.1)2> O0 = riak_object:new(groceries, "mine", ["bread"]).
+{r_object,groceries,"mine",
+ [{r_content,{dict,0,16,16,8,80,48,
+ {[],[],[],[],[],[],[],[],[],[],[],[],[],[],...},
+ {{[],[],[],[],[],[],[],[],[],[],[],[],...}}},
+ ["bread"]}],
+ [],
+ {dict,0,16,16,8,80,48,
+ {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],...},
+ {{[],[],[],[],[],[],[],[],[],[],[],[],[],...}}},
+ undefined}
+
+(riaktest@127.0.0.1)3> %% store the list
+(riaktest@127.0.0.1)3> C:put(O0, 1).
+ok
+
+(riaktest@127.0.0.1)4> %% retrieve the list
+(riaktest@127.0.0.1)4> {ok, O1} = C:get(groceries, "mine", 1).
+{ok,{r_object,groceries,"mine",
+ [{r_content,{dict,2,16,16,8,80,48,
+ {[],[],[],[],[],[],[],[],[],[],[],[],...},
+ {{[],[],[],[],[],[],
+ [["X-Riak-Last-Modified",87|...]],
+ [],[],[],...}}},
+ ["bread"]}],
+ [{"20090722191020-riaktest@127.0.0.1-riakdemo@127.0.0.1-266664",
+ {1,63415509105}}],
+ {dict,0,16,16,8,80,48,
+ {[],[],[],[],[],[],[],[],[],[],[],[],[],...},
+ {{[],[],[],[],[],[],[],[],[],[],[],...}}},
+ undefined}}
+
+(riaktest@127.0.0.1)5> %% extract the value
+(riaktest@127.0.0.1)5> V = riak_object:get_value(O1).
+["bread"]
+
+(riaktest@127.0.0.1)6> %% add milk to the list
+(riaktest@127.0.0.1)6> O2 = riak_object:update_value(O1, ["milk"|V]).
+{r_object,groceries,"mine",
+ [{r_content,{dict,2,16,16,8,80,48,
+ {[],[],[],[],[],[],[],[],[],[],[],[],[],[],...},
+ {{[],[],[],[],[],[],
+ [["X-Riak-Last-Modified",87,101,100|...]],
+ [],[],[],[],[],...}}},
+ ["bread"]}],
+ [{"20090722191020-riaktest@127.0.0.1-riakdemo@127.0.0.1-266664",
+ {1,63415509105}}],
+ {dict,0,16,16,8,80,48,
+ {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],...},
+ {{[],[],[],[],[],[],[],[],[],[],[],[],[],...}}},
+ ["milk","bread"]}
+
+(riaktest@127.0.0.1)7> %% store the new list
+(riaktest@127.0.0.1)7> C:put(O2, 1).
+ok
+
+
+(riaktest@127.0.0.1)8> %% find out what else is in the groceries bucket
+(riaktest@127.0.0.1)8> C:list_keys(groceries).
+{ok,["mine"]}
Oops, something went wrong. Retry.

0 comments on commit db66c33

Please sign in to comment.