NeDBNode 嵌入式数据存储
Node.js 实现的嵌入式数据存储,可以部分或全部替代sqlite数据库。可以当内存数据库使用也可本地存储。
NEDB采用非常灵活的查询方式,让你几乎可以忘记他是非关系数据库:
(1) 可以使用正则查询
(2) and or where 大于 小于 排序等
(3) 索引
数据存储采用JSON新式,可以深度查询。
eg:
// Let's say our datastore contains the following collection
{ _id: 'id5', completeData: { planets: [ { name: 'Earth', number: 3 }, { name: 'Mars', number: 2 }, { name: 'Pluton', number: 9 } ] } }
db.find({ "completeData.planets.0.name": "Earth" }, function (err, docs) { // docs contains document 5 // If we had tested against "Mars" docs would be empty because we are matching against a specific array element });
语法和MongoDB非常相似.
Speed
-
Insert: 5,950 ops/s
-
Find: 25,440 ops/s
-
Update: 4,490 ops/s
-
Remove: 6,620 ops/s
Memory footprint
A copy of the whole database is kept in memory. This is not much on the expected kind of datasets (20MB for 10,000 2KB documents). If requested, I'll introduce an option to not use this cache to decrease memory footprint (at the cost of a lower speed).
缺点:数据加载在内存中进行操作,不适合内存非常紧张的应用。目前作者没有给出细腻度的内存控制方法。
评论
Vedis嵌入式 Redis 存储
Vedis是一个可嵌入式的数据存储的C库,包含跟Redis类似的超过70个命令支持,但没有网络层支持,只是提供进程内的应用访问。特点:Serverless,datastoreengine.Transa
Vedis嵌入式 Redis 存储
0
astoreAvro 数据存储
astore是基于Akka开发的Avro数据存储,持久化功能还在开发中。脚本示例(要求JDK1.8)function onNameUpdated() { var age = record.get
astoreAvro 数据存储
0
sessionStorageHTML5数据存储
sessionStorage是一个实现了HTML5规范中的数据存储的实现,支持主流浏览器。示例代码:sessionStorage.getItem("test");//nullsessionStorag
sessionStorageHTML5数据存储
0
ChanaAvro 数据存储
Chana是基于Akka的Avro数据存储。此项目的名称来自于中文“刹那”,这个词音译自梵文“Kasna”,意思为“一瞬间”。示例代码:function onNameUpdated() { va
ChanaAvro 数据存储
0