ledisdb/index.html

270 lines
8.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<title>LedisDB</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/github.css">
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="header">
<ul class="nav nav-pills pull-right" role="tablist">
<li role="presentation"><a href="/">Home</a></li>
<li role="presentation"><a href="/news.html">News</a></li>
<li role="presentation"><a href="/contact.html">Contact</a></li>
</ul>
<a class="logo" href="/"><img src="/img/logo.png" alt="LedisDB"></a>
</div>
<div class="jumbotron">
<h1>LedisDB</h1>
<p class="lead">A high performance NoSQL like Redis powered by Go.</p>
<p><a class="btn btn-lg btn-ledis" target="_blank" href="https://github.com/siddontang/ledisdb" role="button">
<i class="glyphicon glyphicon-eye-open"></i>
View on GitHub</a></p>
</div>
<div class="row features" id="features">
<div class="col-lg-6">
<h3 class="">Data Structure</h3>
<p>Rich data structure: KV, List, Hash, ZSet, Set.</p>
<h3>Various Backend </h3>
<p>Various backend databases to choose: </p>
<p>LevelDB, goleveldb, LMDB, RocksDB, BoltDB or Memory.</p>
<h3>Expiration & TTL</h3>
<p>Supports expiration and ttl in all kinds of data structures.</p>
<h3>CLI Support</h3>
<p>Redis clients, like redis-cli, are supported directly.</p>
</div>
<div class="col-lg-6">
<h3>Easy Embedding</h3>
<p>Easy to embed in Go application.</p>
<h3>Data Protection</h3>
<p>Replication to guarantee data safety.</p>
<h3>Useful Tools</h3>
<p>Supplies tools to load, dump, and repair database.</p>
<h3>HTTP API</h3>
<p>HTTP interfaces, can be directly accessed by HTTP Clients.</p>
<p>Supplies json、bson、msgpack as request content-type.</p>
</div>
</div>
<div class="row examples" id="examples">
<div class="exmaple">
<h2>CLI Example</h2>
<pre><code class="Bash">
./ledis-server -config=/etc/ledis.json
//another shell
ledis-cli -p 6380
ledis 127.0.0.1:6380&gt; set a 1
OK
ledis 127.0.0.1:6380&gt; get a
"1"
</code></pre>
</div>
<div class"example">
<h2>RESTful Example</h2>
<pre><code class="Bash">
//use curl
curl http://127.0.0.1:11181/SET/hello/world
→ {"SET":[true,"OK"]}
curl http://127.0.0.1:11181/0/GET/hello?type=json
→ {"GET":"world"}
</code></pre>
</div>
<div class="example">
<h2>Lib Example</h2>
<pre><code class="Bash">
import "github.com/siddontang/ledisdb/ledis"
l, _ := ledis.Open(cfg)
db, _ := l.Select(0)
db.Set(key, value)
db.Get(key)
</code></pre>
</div>
</div>
<!-- /benchmark-->
<div class="row benchmark" id="benchmark">
<h2>Benchmark</h2>
<div id="container" style="width: 1150px; height: 400px; margin: 0 0 20px 0 "></div>
<div id="container_ledis" style="width: 1150px; height: 400px; margin: 0 auto"></div>
<br>
<p>For more information, please take a look at <a href="https://github.com/siddontang/ledisdb/wiki/Benchmark"><em>benchmark.md</em></a>.</p>
</div>
<div id="footer-wrapper" class="gradient">
<div id="footer" class="row">
<div class="large-4 columns col-sm-4">
<h2 id="contribute" >Get Involved</h2>
<ul class="underline-link">
<li><a target="_blank" href="https://github.com/siddontang/ledisdb/issues?state=open">Issue Tracker</a></li>
<li><a target="_blank" href="https://github.com/siddontang/ledisdb/issues?labels=todo&page=1&state=open">Todo</a></li>
</ul>
</div>
<div class="large-4 columns col-sm-4">
<h2>Quick Links</h2>
<ul class="underline-link">
<li><a target="_blank" href="https://github.com/siddontang/ledisdb/wiki">Wiki</a></li>
<li><a target="_blank" href="http://ledis-py.readthedocs.org/">Ledis-py</a></li>
<li><a target="_blank" href="https://godoc.org/github.com/siddontang/ledisdb">Godoc</a></li>
</ul>
</div>
</div>
<div id="about" class="about">
<div class="foot">
<p>LedisDB was created and maintained by <a class="underline-link" href="https://github.com/siddontang">SiddonTang</a>.
<a class="underline-link" href="https://github.com/siddontang/ledisdb/blob/master/LICENSE">MIT License</a>.</p>
</div>
</div>
</div>
</div> <!-- /container -->
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/data.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var options = {
chart: {
renderTo: 'container',
type: 'column'
},
title: {
text: 'Redis-Benchmark'
},
xAxis: {
categories: []
},
yAxis: {
title: {
text: 'Requests'
}
},
series: [],
colors: ['#45a797', '#89C4F4', '#52B3D9', '#9B59B6', '#fddd67', '#5fa727','#df4810', '#3d4c4e']
};
var options_ledis = {
chart: {
renderTo: 'container_ledis',
type: 'column'
},
title: {
text: 'Ledis-Benchmark'
},
xAxis: {
categories: []
},
yAxis: {
title: {
text: 'Requests'
}
},
series: [],
colors: ['#45a797', '#89C4F4', '#52B3D9', '#9B59B6', '#fddd67', '#5fa727','#df4810', '#3d4c4e']
};
$.get('redis.csv', function (data) {
parse(data, options);
});
$.get('ledis.csv', function (data){
parse(data, options_ledis)
})
function parse(data, options) {
// Split the lines
var lines = data.split('\n');
$.each(lines, function(lineNo, line) {
var items = line.split(',');
// header line containes categories
if (lineNo == 0) {
$.each(items, function(itemNo, item) {
if (itemNo > 0) options.xAxis.categories.push(item);
});
}
// the rest of the lines contain data with their name in the first position
else if (lineNo < lines.length - 1) {
var series = {
data: []
};
$.each(items, function(itemNo, item) {
if (itemNo == 0) {
series.name = item;
} else{
series.data.push(parseFloat(item));
}
});
options.series.push(series);
}
});
var chart = new Highcharts.Chart(options);
}
});
</script>
</body>
</html>