README edited online with Bitbucket

This commit is contained in:
Sascha L. Teichmann 2014-08-03 16:04:19 +00:00
parent 7a6bde2e5b
commit 7a98421645

155
README
View File

@ -1,77 +1,78 @@
mtredisalize mtredisalize
------------ ------------
A simple server that offers a TCP/Redis interface for LevelDB and SQLite3 based A simple server that offers a TCP/Redis interface for LevelDB and SQLite3 based
Minetest worlds. Minetest worlds.
Disclaimer: Disclaimer:
!!! This software is very young and not well tested! Use at your own risk. !!! This software is very young and not well tested! Use at your own risk.
!!! If you want to try it out backup your original databases, please! !!! If you want to try it out backup your original databases, please!
!!! Motivation:
Motivation:
The Redis backend is nice if you want to do use the backend for other
purposes than backing the Minetest server at the same time, e.g. do The Redis backend is nice if you want to do use the backend for other
some mapping. On the other hand the Redis is by its nature as an in-memory purposes than backing the Minetest server at the same time, e.g. do
database quiet a memory hungry beast. This is fine if you have smaller some mapping. On the other hand the Redis is by its nature as an in-memory
worlds or a lot of hardware to throw on it. database quiet a memory hungry beast. This is fine if you have smaller
worlds or a lot of hardware to throw on it.
The other two backends (SQLite3 and LevelDB) are embedded database
which are hard to work with if you want to access them from another The other two backends (SQLite3 and LevelDB) are embedded database
process. which are hard to work with if you want to access them from another
process.
The idea of mtredisalize is to wrap a server around the embedded databases
and offer a TCP Redis interface a Minetest server and other The idea of mtredisalize is to wrap a server around the embedded databases
processes can connect with. and offer a TCP Redis interface a Minetest server and other
processes can connect with.
Beware! This is _not_ a fully featured Redis server with all of its commands.
Only the subset of Redis commands is implemented which is needed to run Minetes Beware! This is _not_ a fully featured Redis server with all of its commands.
on top of it. Only the subset of Redis commands is implemented which is needed to run Minetes
on top of it.
To build mtredisalize a Go 1.x (x >= 1) enviroment is needed. By now
it is only tested on Ubuntu 14.04/amd64. To build mtredisalize a Go 1.x (x >= 1) enviroment is needed. By now
it is only tested on Ubuntu 14.04/amd64.
Obtain:
Obtain:
$ go get bitbucket.org/s_l_teichmann/mtredisalize
$ go get bitbucket.org/s_l_teichmann/mtredisalize
Development:
Development:
$ go get github.com/mattn/go-sqlite3
$ go get github.com/jmhodges/levigo $ go get github.com/mattn/go-sqlite3
$ hg clone https://s_l_teichmann@bitbucket.org/s_l_teichmann/mtredisalize $ go get github.com/jmhodges/levigo
$ go build $ hg clone https://s_l_teichmann@bitbucket.org/s_l_teichmann/mtredisalize
$ go build
Usage:
Usage:
$ mtredisalize [<options>] /path/to/database
$ mtredisalize [<options>] /path/to/database
with options:
-cache=32: cache size in MB # Cache size for LevelDB with options:
-driver="leveldb": type of database (leveldb, sqlite) -cache=32: cache size in MB # Cache size for LevelDB
-host="": host to bind -driver="leveldb": type of database (leveldb, sqlite)
-port=6379: port to bind -host="": host to bind
-port=6379: port to bind
To use mtredisalize with your particular world you have to modify the
world.mt of the world. To use mtredisalize with your particular world you have to modify the
world.mt of the world.
You have to set the backend to redis and redis_address, the redis_port and the
redis_hash to match the start options of mtredisalize. The hash is ignored by You have to set the backend to redis and redis_address, the redis_port and the
mtredisalize but has to be in the world.mt to make Minetest happy. redis_hash to match the start options of mtredisalize. The hash is ignored by
redis_port defaults to 6379. mtredisalize but has to be in the world.mt to make Minetest happy.
redis_port defaults to 6379.
gameid = minetest
backend = redis gameid = minetest
redis_address = localhost backend = redis
redis_port = 6380 redis_address = localhost
redis_hash = IGNORED redis_port = 6380
redis_hash = IGNORED
would e.g. matches:
would e.g. matches:
$ mtredisalize --port=6380 --host=localhost ..
$ mtredisalize --port=6380 --host=localhost ..
The mandatory path is the path to the database file: map.sqlite in case
of SQLite3 and the directoy map.db in case of LevelDB right beside the world.mt file. The mandatory path is the path to the database file: map.sqlite in case
of SQLite3 and the directoy map.db in case of LevelDB right beside the world.mt file.
This is Free Software under the terms of the MIT license. See LICENSE file for details.
(c) 2014 by Sascha L. Teichmann This is Free Software under the terms of the MIT license. See LICENSE file for details.
(c) 2014 by Sascha L. Teichmann