-
Notifications
You must be signed in to change notification settings - Fork 119
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
Node connection issues have significantly more impact on performance comparing to JS SDK #2070
Comments
Hello @AlexanderShenshin , thank you for opening this issue. I have a couple of questions / suggestions:
|
Hello @0xivanov, thank you for the response. Sure, I will try to address these points. First of all, it's clear for me that connection issues that I encounter are not directly related to Java SDK - my team member do not encounter them using the same code and I noticed that same integration tests work well in GH pipelines (as you mentioned). What makes me curious is that SDKs perform differently. So the point for raising this issue is that JS SDK seems to be performing significantly better in my case and this may uncover some potential improvements for Java SDK side. Regarding To isolate our context, I reproduced the behavior by comparing results of Java and JS SDKs integration tests:
I've run Java SDK tests using following command: Here's the log output for failed Java SDK test case:
And here's the output for successful test case:
For reference, I'm also posting full logs of a single test run for both SDKs: |
I've spent some time looking into this today and I have a couple of things to say:
|
I am still unable to reproduce this on testnet, I am conncting to node 9, which was failing for you. |
Got it, thank you for an update. I tried to run the same test with 10 max nodes per transaction and extended timeout for grpc requests (10 minutes), problematic behavior is still here - I was able to get Regarding reproduction, I believe it's hard to reproduce because it seems to be environment/network specific. |
Recently I noticed performance inconsistency between Hedera Java SDK and JS SDK while having issues with node connections, with Java SDK working significantly worse.
I would like to share my findings, it may help to find potential issues in Java SDK and/or figure out what exactly work better in JS SDK for described case.
Environment
Problem description
The issues were initially discovered while running some tests against Hedera Testnet using Java SDK under the hood.
These tests are only using HCS-related API (topic creation, submitting & reading topic messages).
I tried to run the same tests in JS library (uses JS SDK) and it apparently worked fine.
To confirm my assumptions, I ran Java SDK integration tests against Testnet and observed the same performance/timeouts issues.
Summary of issues comparing to JS SDK:
java.util.concurrent.TimeoutException
) that randomly happen ontransaction.execute()
calls and HCS topic messages subscriptionWorkaround
It was possible to work around the problem by doing the following:
can connect to testnet with TLS STANDARD_OUT
:Client.fromConfig()
with custom config instead ofClient.forTestnet()
After moving to custom network map/config, timeouts and performance issues are gone. Same integration tests that I run with Java SDK are now even faster than with JS SDK.
The text was updated successfully, but these errors were encountered: