Twisted 的非关系数据库
我正在寻找任何用于在异步模式下使用twisted 的键值数据库实现。 我的一个想法是将 Twisted Memcache API 与 MemcacheDB 结合使用。
这是其他解决方案吗?
I'm looking for any key-value database implementation for working with twisted in asynchronous mode.
The one Idea that I have is using the Twisted Memcache API with MemcacheDB.
Is this some other solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可能的解决方案之一是使用 Redis(远程字典服务器)。
Redis 是一种非常快速、强大且稳定的键值存储,许多项目中都使用了它。 Stackoverflow 也使用 Redis;)。
我最近开始在当前项目中使用 redis 来创建用户评分。我个人的看法:redis非常简单,非常快而且稳定。它还有一个漂亮的命令行客户端,我喜欢它。
在网站上,我使用同步
redis
package。服务器使用扭曲并且需要异步方法。幸运的是,有第三方模块txredis,它可以使用twisted轻松与redis数据库交互。我对此没有任何问题。不过,txredis 没有连接池,但如果需要的话,手动实现也不是问题。One of possible solution is using Redis(REmote DIctionary Server).
Redis is very fast, powerful and stable key-value storage which is used in many projects. Stackoverflow also uses redis;).
I've recently start using redis in my current project for creating user's ratings. My personal opinion: redis is very simple, very fast and stable. It also has a pretty command line client, I like it.
On website I use synchronous
redis
package. Server uses twisted and requires asynchronous approach. Fortunately, there is third-party module txredis, which allows easily to interact with redis database using twisted. I didn't have any problems with it. However,txredis
doesn't have a connection pool, but it's not a problem to implement it manually, if needed.我使用来自twisted的Apache Cassandra,如果生产多年,则使用Telephus。
I use Apache Cassandra from twisted, using Telephus if production for years.
给@dr再补充一点。的答案标记为已接受:使用 python 包 txredisapi,它使用 Twisted 的 Redis 协议,具有连接池支持等等。
Adding one more point to @dr. 's answer marked as accepted : Use the python package txredisapi, which uses redis protocol for twisted with connection pool support and many more.