txAerospike - Aerospike and Twisted

144 views Asked by At

Is there a twisted library for Aerospike? Has anyone used both in combination - or is Aerospike so fast that the standard python client is enough?

2

There are 2 answers

0
Ronen Botzer On BEST ANSWER

The Aerospike C client is very fast, but wrapping standard Python around it slows things down, mainly due to memory allocations and type casting.

I don't know of a project combining Twisted with the Aerospike client. Async functions are being considered but Python has different approaches to it from Twisted to gevent. We'd be happy to support such a project.

2
Artur Gaspar On

When you're doing asynchronous network operations (like you do with Twisted) it shouldn't really matter how "fast" they are.

The usual approach for performing blocking calls from Twisted is running them in a thread (example), for example with twisted.internet.threads.deferToThread.