cqlengine async support

210 views
Skip to first unread message

Ivan

unread,
Nov 12, 2015, 9:38:30 AM11/12/15
to DataStax Python Driver for Apache Cassandra User Mailing List
Hi,

As far as I can see, current Python driver's cqlengine module doesn't support asynchronous execution. It looks like that adding asynchronous functionality to cqlengine Model class is pretty straightforward and requires two things: 

1. I need to inherit DMLQuery class and implement the _execute method so that it would call execute_async() method instead of execute()
2. I need to create an AsyncModel class that knows that my AsyncDMLQuery returns a ResponseFuture object.

Is that it? Or do I need to reimplement anything else?


--
Best regards,
Ivan Gromov

Adam Holmberg

unread,
Nov 12, 2015, 10:04:37 AM11/12/15
to python-dr...@lists.datastax.com
Those sound like the good starting points. I haven't given this a lot of thought because normally I reach for the core driver for non-trivial execution models. That said, a couple of questions occurred to me as I read your message:

Have you considered adding async variants of dml methods to the Model instead of creating a specialization? Underlying execution could always use async execution, and the sync methods could just wait on the future.

It seems like you're mostly focused on the write path. Have you given any thought to how this might look on the read paths?

Adam

--
You received this message because you are subscribed to the Google Groups "DataStax Python Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-driver-u...@lists.datastax.com.

Aaron Benz

unread,
Jul 14, 2016, 4:38:57 PM7/14/16
to python-dr...@lists.datastax.com
Was there every any progress on this?
--

Alan Boudreault

unread,
Jul 15, 2016, 8:18:47 AM7/15/16
to python-dr...@lists.datastax.com
We haven´t got the chance to look into this yet. I´ve created a ticket to investigate async execution in cqlengine for a future release.


Alan Boudreault
Software Engineer (Drivers) | alan.bo...@datastax.com


Reply all
Reply to author
Forward
0 new messages