Est-ce que quelqu'un sait d'un client Couchbase asynchrone pour le framework web Tornado?

StackOverflow https://stackoverflow.com/questions/9338532

  •  27-10-2019
  •  | 
  •  

Question

Je suis en train d'écrire une application Web qui utilise Nginx pour servir du contenu statique et tornade pour servir du contenu dynamique. Je pensais à utiliser Couchbase comme mon datastore, mais ai du mal à trouver un client approprié pour une utilisation avec le cadre Tornado (à savoir asynchrone). Quelqu'un sait-il d'un?

Je l'ai vu trombi: https://github.com/inoi/trombi mais couldn » t trouver beaucoup d'informations à ce sujet. Si quelqu'un a eu une expérience avec elle (bon ou mauvais), je serais ravi d'entendre parler.

Était-ce utile?

La solution

I would really recommend sticking with the Couchbase released code for Python. While it isn't technically asynchronous, the queries are so fast that it really doesn't factor into things. Its not like building out a query for a Database which could easily lock up continued actions for a period of time. Not to mention the fact there is a lot of load balancing and bucket management code that you would lose in most situations by trying to find some third party module for it.

Also you can always build a multiprocessing package to create sub-processes to handle removing these calls from the primary process stream and reduce the impact to almost nothing.

UPDATE

Another option is to use Tornado's internal callback functionality to offset the blocking process so it doesn't impair browsing. A method for this is described here: http://tornadogists.org/2185380/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top