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

Exploratory: Alternative Node.js target implementation #32

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Frixuu
Copy link
Contributor

@Frixuu Frixuu commented Sep 22, 2024

This approach requires app devs to depend on deasync, a small native Node module that allows some of the code to be blocking.

Additionally:

  • Made TCP dependency more obvious, since it is the main thing that needs to be ported between targets
  • Adjusted test cases to work on both Node and Hashlink (but did not move them to a testing framework like utest/tink/buddy)
  • Updated editor configuration and CI workflow
  • The library still works on Haxe 4.2.0 (released February 2021)

This makes it easier to port Weblink to other platforms, such as Node.js, because it effectively reduces the needed API surface area.
It certainly lacks in certain areas, e.g. the included test suite does not compile yet.

However, the basic logic is present and a simple Hello World example does build and work.
By moving the server to a background thread, we can better handle blocking HTTP requests.

Additionally, while the Node.js version of the tests still does not compile, it will use very similar semantics in the future.
This should allow actual persistent connections (keep-alive).

Pipelining and multiplexing are still not supported.
@PXshadow
Copy link
Owner

Hey sorry going to go through and review all of your prs now. I greatly appreciate the effort you put into them @Frixuu , and I hope to get them all merged very swiftly, as I like the direction of the pull requests, and you have written very nice code.

@Frixuu Frixuu changed the title Alternative Node.js target implementation Exploratory: Alternative Node.js target implementation Oct 2, 2024
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