Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous mode for Space record #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tetraidr
Copy link

@tetraidr tetraidr commented Mar 27, 2018

Reproducer:
Lets add test for space and tuple-space with asynchronous mode.
New config:
https://github.com/Sberbank-Technology/tarantool-clj-1.7/blob/master/config/test_async.clj
New test file:
https://github.com/Sberbank-Technology/tarantool-clj-1.7/blob/master/test/tarantool_clj/client_async_test.clj
Test results:
tuple-space test - {:test 1, :pass 9, :fail 0, :error 0, :type :summary}
space test - {:test 1, :pass 0, :fail 0, :error 15, :type :summary}
When i tried "(space/select-first space {:id 1})", i got "CompilerException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.core.async.impl.channels.ManyToManyChannel, compiling:(D:/work/connector/test/tarantool_clj/client_async_test.clj:26:1)". It happened cause record TarantoolConnection returned channel (in async mode), then record Space tried to exec function first with channel. Same with other funcs.
My offer: add parameter callback-function to send-request at Connection. This callback-fn contains function for processing data from tarantool, so data in channel is ready for use and there is no need to process data in Space record.
Lets discuss this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant