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/01/07 05:49:30 UTC
Re: How asynchronous cache is implemented
Hi Antonio,
Can you please properly subscribe to the mailing list, so that the community
receives email notifications? Just follow the simple instruction here:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1
asi wrote
> HI,
>
> I am new to Apache Ignite.
>
> I am curious how asynchronous cache is implemented. For example, for the
> code:
>
> IgniteCache<String, Integer> asyncCache =
> ignite.cache("mycache").withAsync();
>
> asyncCache.getAndPut("1", 1);
>
> Does the Future object get queued to a queue and processed by a thread
> pool? What is the code that I can look at to understand how it works?
>
> Thanks very much in advance.
>
> Antonio.
Asynchronous operation in Ignite means that it will not wait for the
network. I.e., if the key is local, it will be actually synchronous, but if
it is mapped to a remote node, it will prepare the request, put it into
communication queue and exit. The future will be completed once the
corresponding response is received.
Makes sense?
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-asynchronous-cache-is-implemented-tp2399p2405.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How asynchronous cache is implemented
Posted by vkulichenko <va...@gmail.com>.
Hi Devin,
Please properly subscribe to the mailing list so that the community can
receive email notifications. Here is the instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1
Devin Louis wrote
> I wonder if asynchronous mode will work when the cache's nearcache mode is
> enabled?
It will be async when a remote call is needed, i.e. when there is no entry
in the near cache.
-Val
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-asynchronous-cache-is-implemented-tp2399p6818.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How asynchronous cache is implemented
Posted by Denis Magda <dm...@gridgain.com>.
Hi Antonio,
Actually a cache related request goes this way:
- first it gets to
org.apache.ignite.internal.processors.cache.GridCacheIoManager;
- after that it's transferred to
org.apache.ignite.internal.managers.communication.GridIoManager which
sends the request using one of TcpCommunicationSpi;
- TcpCommunicationSpi sends the request asynchronously over network
- Response is received asynchronously as well and after that your async
operation will be completed once the response is processed.
If you're even more curious how the things work internally then my
suggestion is to dig into the code and debug an execution flow ;)
--
Denis
On 1/7/2016 7:32 PM, asi wrote:
> Thanks Val.
>
> I suppose the communicate queue is an in-memory queue? What is the class
> name of that communication queue?
>
> Thanks again.
>
> Antonio.
>
>
>
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-asynchronous-cache-is-implemented-tp2399p2438.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How asynchronous cache is implemented
Posted by asi <an...@gmail.com>.
Thanks Val.
I suppose the communicate queue is an in-memory queue? What is the class
name of that communication queue?
Thanks again.
Antonio.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-asynchronous-cache-is-implemented-tp2399p2438.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.