简体   繁体   English

扭曲的非关系数据库

[英]Non relational database for twisted

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. 我的一个想法是使用带有MemcacheDB的Twisted Memcache API。

Is this some other solution? 这是其他解决方案吗?

One of possible solution is using Redis (REmote DIctionary Server). 可能的解决方案之一是使用Redis (REmote DIctionary Server)。 Redis is very fast, powerful and stable key-value storage which is used in many projects . Redis是一种非常快速,强大且稳定的键值存储,可用于许多项目 Stackoverflow also uses redis;). Stackoverflow也使用redis;)。

I've recently start using redis in my current project for creating user's ratings. 我最近开始在我当前的项目中使用redis来创建用户的评级。 My personal opinion: redis is very simple, very fast and stable. 我的个人观点:redis非常简单,非常快速和稳定。 It also has a pretty command line client, I like it. 它还有一个漂亮的命令行客户端,我喜欢它。

On website I use synchronous redis package . 在网站上我使用同步redis Server uses twisted and requires asynchronous approach. 服务器使用扭曲并需要异步方法。 Fortunately, there is third-party module txredis , which allows easily to interact with redis database using twisted. 幸运的是,有第三方模块txredis ,它允许使用twisted来轻松地与redis数据库进行交互。 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. 但是, txredis没有连接池,但如果需要,手动实现它不是问题。

如果生产多年,我使用的是使用Telephus扭曲的Apache Cassandra。

Adding one more point to @dr. 再向@dr添加一个点。 's answer marked as accepted : Use the python package txredisapi , which uses redis protocol for twisted with connection pool support and many more. 标记为已接受的答案:使用python包txredisapi ,它使用redis协议进行扭曲连接池支持等等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM