Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ds_mget返回格式变了 #8

Open
rchunping opened this issue Jan 5, 2013 · 14 comments
Open

ds_mget返回格式变了 #8

rchunping opened this issue Jan 5, 2013 · 14 comments

Comments

@rchunping
Copy link
Contributor

差点被坑爹了

升级新版后发现 ds_mget结果格式变了

$ret = phpiredis_command_bs($redis,array('ds_mget','key1','key2'));

原来版本中返回queryString形式的结果 key1=value1&key2=value2

现在变成 array(0=>value1,1=>value2)

不知道是 redis-storage的变化还是 phpiredis的变化,估计是前者

变得好,这样很好,但是最好有个变更说明啥的 :)

@rchunping
Copy link
Contributor Author

好吧,原来在之前closed issues 里面提到过 -_-

@shenzhe
Copy link
Collaborator

shenzhe commented Jan 5, 2013

呵呵,我认为还是统一的比较好。所以我给改动了,

推荐使用phpredis这个扩展,蛮好用的。https://github.com/shenzhe/phpredis

请持续关注和狠狠的提bug. 👍

@rchunping
Copy link
Contributor Author

强烈支持!
把2个高性能的东东完美结合!

本来一直在找把leveldb做成服务的东西,后来找到 node-levelup这个,在node.js下性能很好,我把它封装成http服务,结果性能不行,还是你这个给力!

在几个项目中部署这个东西也有些时间了,实际碰到了几个问题,希望能在后续版本中考虑改进:

  1. 单个redis能支持多个leveldb,现在我是配置多个redis来解决
  2. 能做成几个安装包,支持ubuntu/centos/ 32位+64位 ,因为在不同系统部署起来每次编译实在是麻烦
  3. leveldb啥时候能支持目录hash,我有个项目leveldb下20G数据近1万个.sst文件,在某些文件系统上单目录塞这么多文件会影响性能 (比如我有些机器是FreeBSD+ZFS,这是个大问题)

@rchunping
Copy link
Contributor Author

另外一个比较需要的是能否实现类似这样的功能
https://github.com/rvagg/node-levelup#dbreadstreamoptions

本身leveldb的数据是有序的,能否增加命令,用于查询某个范围的key,支持返回key或者key+value,支持正向或者逆向的限量返回

主要目的是可以进行一定程度的数据遍历,要不然很大程度还要依赖关系数据库来辅助处理数据。

@qiye
Copy link
Owner

qiye commented Jan 6, 2013

嗯.这个问题。我们解决一下。现在弄成统一的。我把处理结果 也变一下。 做个统一

@rchunping
Copy link
Contributor Author

额,qiye的意思不会变回去吧? -_-

@qiye
Copy link
Owner

qiye commented Jan 6, 2013

不会变回去的。用统一 类似redis的格式

@qiye
Copy link
Owner

qiye commented Jan 6, 2013

没问题。我这几天把这个功能给加上
————————————
另外一个比较需要的是能否实现类似这样的功能
https://github.com/rvagg/node-levelup#dbreadstreamoptions

本身leveldb的数据是有序的,能否增加命令,用于查询某个范围的key,支持返回key或者key+value,支持正向或者逆向的限量返回

主要目的是可以进行一定程度的数据遍历,要不然很大程度还要依赖关系数据库来辅助处理数据。

@qiye
Copy link
Owner

qiye commented Jan 6, 2013

你的sst文件大小是多少。 你可以加大write_buffer_size的数字。可以加大单个sst文件的大小。 减少sst的个数。还有,你有没有用snappy 压缩。 用snappy 也能省很多空间的

@rchunping
Copy link
Contributor Author

ds:write_buffer_size 999999

看leveldb的资料,它默认就是2M sst的, 改sst文件大小要改leveldb源码的,没去弄它。

snappy使用了的。

@rchunping
Copy link
Contributor Author

http://leveldb.googlecode.com/git-history/69c6d38342a1fab5f7f2921aa2e9c0e60ba90e35/doc/impl.html

提到了这个问题,ext3的10万个文件测试结果不慢,所以...只有一句话
"So maybe even the sharding is not necessary on modern filesystems?"

@qiye
Copy link
Owner

qiye commented Jan 6, 2013

你能不能帮我们做几个安装包。我们人手有限。需要更多的朋友加入我们一起维护

能做成几个安装包,支持ubuntu/centos/ 32位+64位 ,因为在不同系统部署起来每次编译实在是麻烦

@rchunping
Copy link
Contributor Author

嗯,力所能及的,乐意效劳。 不过ubuntu/centos 上我没有打包经验 ,freebsd上的我抽空可以试试

@qiye
Copy link
Owner

qiye commented Jan 7, 2013

哈哈。我找找教程给你哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants