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

Fix TcpProxy for non HTTP communication #1041

Merged
merged 4 commits into from
Aug 2, 2024
Merged

Conversation

grisha87
Copy link
Contributor

@grisha87 grisha87 commented Aug 1, 2024

The problem

The current implementation of the TCP proxy failed to correctly transfer data back and forth for non HTTP communication. Trying to execute plain TCP use cases with this rendered it unusable and errornous.

Solution

This PR solves this by reimplementing the TCP Proxy logic and providing missing features such as buffering of the communication while waiting for the other endpoints to be fully ready to accept communication.

In addition:

  • I've added a vanila golem-js example for the TcpProxy feature which was missing
  • I've renamed the waitForCondition internal helper function to waitFor and exposed this as a utility from golem-js as this is a feature that gets implemented by many requestor scripts on their own.

@grisha87 grisha87 requested review from mgordel and SewerynKras August 1, 2024 07:22
@grisha87 grisha87 marked this pull request as ready for review August 1, 2024 07:24
Copy link
Contributor

@mgordel mgordel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it via telnet and it works fine. But the example has a small bug

You can also add this example to package.json in examples.

…no assumed timeout in waitFor

RemoteProcess.isFinished is now completing correctly when the user
breaks runAndStream using an abort controller
. In addition, waitFor is no longer assuming a timeout of 30s for the
user.
@grisha87 grisha87 requested a review from mgordel August 2, 2024 10:19
@mgordel mgordel merged commit 28270ab into beta Aug 2, 2024
8 checks passed
@mgordel mgordel deleted the bugfix/tcp-proxy-patch branch August 2, 2024 10:27
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.

2 participants