You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/07/25 23:05:18 UTC
Re: How Asynchronous support works underneath? 60 * N put calls
every second
Hi,
Ignite asynchronous support only affects the way how the client interacts
with the API, the actual execution doesn't change. When you execute anything
asynchronously, you don't wait for any network calls initiated by your
client. Instead, you receive the future that will be completed when the
response from a remote node comes back. Having said that, no new threads are
used. The future that you receive after executing async operation will let
you know when the operation completes and whether it was successful or not.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-Asynchronous-support-works-underneath-60-N-put-calls-every-second-tp6482p6526.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How Asynchronous support works underneath? 60 * N put calls
every second
Posted by vkulichenko <va...@gmail.com>.
There are threads involved, of course (e.g., there are several workers
dedicated exclusively for writing the data into the channel), but you do not
occupy any thread for the whole duration of an operation if it's executed
asynchronously. In other words, you do not need a separate thread for each
operation.
About async IO in general read here:
https://en.wikipedia.org/wiki/Non-blocking_I/O_(Java)
For implementation in Ignite refer to TcpCommunicationSpi source code.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-Asynchronous-support-works-underneath-60-N-put-calls-every-second-tp6482p6813.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How Asynchronous support works underneath? 60 * N put calls
every second
Posted by zshamrock <al...@gmail.com>.
But, how the future gets notified? What does mean async IO, and how it could
be implemented without using threads? Do you use some kind of event/infinite
loop?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-Asynchronous-support-works-underneath-60-N-put-calls-every-second-tp6482p6745.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How Asynchronous support works underneath? 60 * N put calls
every second
Posted by vkulichenko <va...@gmail.com>.
Ignite uses async IO for communication. So it just asynchronously send a
request message and creates a future which will be completed when response
for this request is received. So there is nothing actually happening while
we're waiting for response and another thread is not needed.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-Asynchronous-support-works-underneath-60-N-put-calls-every-second-tp6482p6549.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How Asynchronous support works underneath? 60 * N put calls
every second
Posted by zshamrock <al...@gmail.com>.
Hi, Val, but if it is not blocking, how it could be done without using an
additional thread? If you return the Future back, the operation must be
happening in the backround (i.e. a new thread), is not it?
Thank you.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-Asynchronous-support-works-underneath-60-N-put-calls-every-second-tp6482p6539.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.