newghost
V2EX  ›  Redis

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

  •  
  •   newghost ·
    newghost · Oct 26, 2015 · 5510 views
    This topic created in 3869 days ago, the information mentioned may be changed or developed.

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

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

    https://github.com/newghost/redblade

    4 replies    2015-10-27 10:17:01 +08:00
    Iteye
        1
    Iteye  
       Oct 26, 2015
    我好像没看懂你这个工具具体的使用场景啊
    newghost
        2
    newghost  
    OP
       Oct 27, 2015
    @Iteye

    很正常,这得对 redis 非常熟估计才能用上……
    llhhss
        3
    llhhss  
       Oct 27, 2015
    newghost
        4
    newghost  
    OP
       Oct 27, 2015
    @llhhss

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

    而且官方的索引只支持无权重(无序)集合,这个插件扩展支持有序集合;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2252 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 00:29 · PVG 08:29 · LAX 17:29 · JFK 20:29
    ♥ Do have faith in what you're doing.