V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
newghost
V2EX  ›  Redis

写了一个 redis ORM/Index helper;自动更新索引,全字段查询

  •  
  •   newghost ·
    newghost · 2015-10-26 15:30:56 +08:00 · 4571 次点击
    这是一个创建于 3095 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Redis 非常快,非常适合做缓存, 你见过刚启动只占用 1M 左右的内存吗?本人之前做了个纯基于 REDIS 的网站,性能还是非常给力的,而且很省钱(只在更新数据时才会读写 IO , aws 对 IO 是有访问限制的)

    但是 Redis 只支持 string, hash, list, set, sortedset 等一些基本数据,索引要自己维护,其实非常不方便,所以做了这样一个项目, 仅一个文件实现,帮你自动实现索引,自动验证数据,可以像普通数据库一样操作和查询;目前功能还非常简单,欢迎测试。

    https://github.com/newghost/redblade

    4 条回复    2015-10-27 10:17:01 +08:00
    Iteye
        1
    Iteye  
       2015-10-26 22:08:44 +08:00
    我好像没看懂你这个工具具体的使用场景啊
    newghost
        2
    newghost  
    OP
       2015-10-27 08:37:12 +08:00
    @Iteye

    很正常,这得对 redis 非常熟估计才能用上……
    llhhss
        3
    llhhss  
       2015-10-27 09:48:34 +08:00
    newghost
        4
    newghost  
    OP
       2015-10-27 10:17:01 +08:00
    @llhhss

    嗯,非常类似,这里只要定好 schema , insert/delete/update 会自动帮你创建 /更改 /删除这些 index set ;

    而且官方的索引只支持无权重(无序)集合,这个插件扩展支持有序集合;
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3132 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:42 · PVG 22:42 · LAX 07:42 · JFK 10:42
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.