add asynchronous support now that thrift has async support #100

Closed
deanhiller opened this Issue Aug 2, 2012 · 9 comments

3 participants

@deanhiller

It would be really nice to be on par with hbase async support and have async for cassandra.

@deanhiller

any movement on adding async support now that thrift has it? as PlayOrm is based on astyanax and would LOVE to add asynchronous support for calls into cassandra like public void find(keyList, responseCallback) so responses are fired back to the client as they come in not holding up any threads.

@deanhiller

http://stackoverflow.com/questions/7465435/asynchronous-request-with-thrift-in-java

NOTE: We have an csv upload of 1 million rows that we use PlayOrm and we have 20 threads writing for the one POST request sent by the client. We noticed on performance 100k rows takes 33 seconds with a synchronous playorm flush and simulating an asynch flush, it only takes 3 seconds to complete(10 times performance boost so we can return to client faster). Will asynch be implemented in astyanax or will a git pull be accepted if we try to do one?

@elandau
Netflix, Inc. member

We weren't planning to implement this any time soon. A pull request for this would be greatly appreciated.

@deanhiller

shoot, this is looking like it will be a huge challenge since asyanax uses TSocket and not TNonblockingSocket :(

https://chamibuddhika.wordpress.com/2011/10/02/apache-thrift-quickstart-tutorial/

@elandau
Netflix, Inc. member

You should be able to write a new ThriftAsyncConnectionFactoryImpl based on ThriftSyncConnectionFactoryImpl. It may also be necessary to further abstract the Client class from ThriftKeyspaceImpl.

@deanhiller

thanks for the tip, we will look into that.

Dean

@deanhiller

Quick question I hope. I checked it out and ran the typical "./gradlew build" which fails. Is the current master branch in a failure state(I want to start from a good working state)....

The error is thus(which is not what I am used to as usually it just says the test that failed in gradle?)

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':astyanax-entity-mapper:test'. > Process 'Gradle Worker 3' finished with non-zero exit value 1
@deanhiller

ah, never mind, can't have cassandra running.

@opuneet

Closing this out assuming that there isn't any outstanding issue here.

@opuneet opuneet closed this Oct 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment