igrigorik / tokyo-recipes

Lean & mean Tokyo Cabinet recipes (with Lua)

This URL has Read+Write access

igrigorik (author)
Sun Nov 01 19:35:57 -0800 2009
commit  00d8b8bae0e23b108770d0ccf7473bd51052cd39
tree    066a495170cff16e5f67a8c07335d5c830e7b851
parent  38f57d8ffc3bc7538b842f336ec4ca9baac6fa5e
tokyo-recipes / increment-command
name age message
..
file README.rdoc Mon Jul 06 20:55:14 -0700 2009 increment counter via Lua [igrigorik]
file incr.lua Mon Jul 06 20:55:14 -0700 2009 increment counter via Lua [igrigorik]
file incr.rb Mon Jul 06 21:00:24 -0700 2009 simple echo extension with Lua (nothign is stor... [igrigorik]
increment-command/README.rdoc

Increment command

Implements a simple incr command on top of Tokyo Cabinet via a Lua Extension.

Starting server with incr extension

  > ttserver -ext incr.lua test.tch

Executing from command line

  > tcrmgr ext localhost incr keyname 2
  > 2
  > tcrmgr ext localhost incr keyname 2
  > 4

Executing via Ruby

  > ruby incr.rb
  > 2
  > 4
  > 6
  > 8
  > 9
  > 10