Created
April 21, 2010 19:23
-
-
Save dscape/374289 to your computer and use it in GitHub Desktop.
Using Redis with MarkLogic Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/Desktop | |
wget http://redis.googlecode.com/files/redis-1.2.6.tar.gz | |
tar -xvf redis-1.2.6.tar.gz | |
cd redis-1.2.6/ | |
make | |
./redis-server | |
## you need port 6379 open. Possible to change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## for non-debian distro use whatever applies (e.g. yum) | |
sudo apt-get install ruby irb rdoc rubygems git-core | |
sudo gem install rack redis mongrel | |
git clone git://github.com/dscape/Sikwamic.git | |
cd Sikwamic | |
ruby sikwamic.rb | |
## You need port 9291 open. for an alternative change sikwamic.rb | |
## primitive support, redis offers some more functionality | |
## check http://code.google.com/p/redis/wiki/IntroductionToRedisDataTypes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: | |
: You need to have cq running (this also means marklogic server installed) | |
: Just: | |
: - install MarkLogic Server | |
: - access localhost:8001 | |
: - add a new app server | |
: - set name as cq | |
: - set root as Samples/cq | |
: - set port to an available port (e.g. 8003) | |
: - click ok | |
: - you can now access cq in http://localhost:8003 | |
:) | |
xdmp:http-get("http://localhost:9291/foo")[2]//text() | |
(: returns empty sequence :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdmp:http-post("http://localhost:9291/foo/bar")[2]//text() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdmp:http-get("http://localhost:9291/foo")[2]//text() | |
(: returns bar :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment