[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16883794#comment-16883794 ] Aleksey Plekhanov commented on IGNITE-11685: [~Pavlukhin], [~isapego] thanks for the review. I've done benchmarks, there is about 2% performance drop in the single thread mode in the worst case (in-memory atomic cache, single localhost server node without network delays), but I see no ways how to get rid of any added synchronizators or data-structures and still preserve async mode and thread-safety. Perhaps, if we will really need this 2% for some corner case in the future we can add a new parameter to the configuration (sync or async mode). Merged to master. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 4h 20m > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16880150#comment-16880150 ] Ivan Pavlukhin commented on IGNITE-11685: - [~alex_pl], I checked the latest changes, everything looks fine. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 4h 20m > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16879387#comment-16879387 ] Ivan Pavlukhin commented on IGNITE-11685: - [~alex_pl], I left one more comment on GitHub. Please check whether it is relevant. Everything else is fine. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 4h 10m > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16879353#comment-16879353 ] Igor Sapego commented on IGNITE-11685: -- [~alex_pl], I don't. Looks good overall, you may proceed. I was mostly concerned with protocol changes and possible backward compatibility issues. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 4h > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16879336#comment-16879336 ] Aleksey Plekhanov commented on IGNITE-11685: [~Pavlukhin], I've checked TC and found one bug, also I've improved some diagnostic messages (which helps me to find this bug). Now TC looks good. There are minor fixes in PR, could you please have a look again? [~isapego], do you have any additional comments? Can I proceed with the merge? > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 4h > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16879090#comment-16879090 ] Ivan Pavlukhin commented on IGNITE-11685: - [~alex_pl], looks fine to me. Thank you! > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 4h > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16878824#comment-16878824 ] Aleksey Plekhanov commented on IGNITE-11685: [~Pavlukhin], thanks for the review. I've fixed your comments, please have a look again. Also, I will try to benchmark this fix tomorrow or next week. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 4h > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16878495#comment-16878495 ] Ivan Pavlukhin commented on IGNITE-11685: - [~alex_pl], I left my comments on [GitHub|https://github.com/apache/ignite/pull/6595#pullrequestreview-257886774]. Repeating a part of it here: Generally, I suppose that a concurrent request/response processing discipline should be described in comments. Especially it is relevant to TcpClientChannel.receive method because it employs tryLock and timeout waiting on a future. Moreover, it would be great to be sure that there is no performance drop for a single-threaded usage by running benchmarks. Concurrent data structures and more locks are involved now, so a negative impact is possible. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 1.5h > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876287#comment-16876287 ] Aleksey Plekhanov commented on IGNITE-11685: [~isapego], yes, sure, it's OK. Thank you. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 10m > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876237#comment-16876237 ] Igor Sapego commented on IGNITE-11685: -- [~alex_pl] sure, let me take a look. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 10m > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876229#comment-16876229 ] Aleksey Plekhanov commented on IGNITE-11685: [~isapego], can you please review the PR? > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Assignee: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > Time Spent: 10m > Remaining Estimate: 0h > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16838470#comment-16838470 ] Aleksey Plekhanov commented on IGNITE-11685: [~kcheng.mvp] a thread can create a future on request sent, another thread can complete this future if it receives a response with corresponding request id. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-11685) Java thin client: Handle multiple async requests in parallel
[ https://issues.apache.org/jira/browse/IGNITE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16833322#comment-16833322 ] kcheng.mvp commented on IGNITE-11685: - [~alex_pl] If use async in the thin client. then how does the previous requester get the response/result? As the tcp socket is currently used by another thread. > Java thin client: Handle multiple async requests in parallel > > > Key: IGNITE-11685 > URL: https://issues.apache.org/jira/browse/IGNITE-11685 > Project: Ignite > Issue Type: Improvement > Components: thin client >Reporter: Aleksey Plekhanov >Priority: Major > Labels: iep-34 > > In the current implementation {{ReliableChannel}} uses an exclusive lock to > send a request and waits for response synchronously. In this implementation, > there are no benefits of using multiple threads. To improve throughput and > latency we can implement async request/response processing on the client > side, since the server side is already async. -- This message was sent by Atlassian JIRA (v7.6.3#76005)