diff --git a/README.md b/README.md index a0c3918..69e19a3 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ - [x] __MongoDB Compatible__ : It's just a 'MongoDB' with transaction support, built-in 'Mongoose' support. -![Architecture](https://github.com/memdb/memdb/wiki/images/architecture.png) +![memdbshell.gif](https://github.com/memdb/memdb/wiki/images/memdbshell.gif) ## [The Wiki](https://github.com/memdb/memdb/wiki) @@ -46,31 +46,7 @@ memdbcluster [start | stop | status] [--conf=memdb.conf.js] [--shard=shardId] ``` ### Play with memdb shell - -```js -$ memdb -s s1 [--conf=memdb.conf.js] // specify the shard's id to connect -MemDB shell -connected to 127.0.0.1:31017 -memdb> db.insert('player', {_id : 1, name : 'rain'}) // insert a doc to 'player' collection -'1' -memdb> db.find('player', 1) // find doc by id -{ _id: '1', name: 'rain' } -memdb> db.commit() // commit changes -true -memdb> db.update('player', 1, {$set : {name : 'snow'}}) // update doc -1 -memdb> db.find('player', 1, 'name') -{ name: 'snow' } -memdb> db.rollback() // rollback changes -true -memdb> db.find('player', 1, 'name') -{ name: 'rain' } -memdb> db.remove('player', 1) // remove doc -1 -memdb> db.commit() -true -memdb> ^D (to exit) -``` +See the top GIF, note how ACID transaction works. ### Nodejs Client with AutoConnection diff --git a/app/shard.js b/app/shard.js index 1e78382..61420a7 100644 --- a/app/shard.js +++ b/app/shard.js @@ -57,7 +57,7 @@ var DEFAULT_IDLE_TIMEOUT = 1800 * 1000; var DEFAULT_PERSISTENT_DELAY = 600 * 1000; // timeout for locking backend doc -var DEFAULT_BACKEND_LOCK_TIMEOUT = 10 * 1000; +var DEFAULT_BACKEND_LOCK_TIMEOUT = 30 * 1000; // retry interval for backend lock var DEFAULT_BACKEND_LOCK_RETRY_INTERVAL = 50; @@ -66,7 +66,7 @@ var DEFAULT_BACKEND_LOCK_RETRY_INTERVAL = 50; var DEFAULT_RELOAD_DELAY = 20; // timeout for locking doc -var DEFAULT_LOCK_TIMEOUT = 10 * 1000; +var DEFAULT_LOCK_TIMEOUT = 30 * 1000; // heartbeat settings, must be multiple of 1000 var DEFAULT_HEARTBEAT_INTERVAL = 2 * 1000;