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

Run processes in web workers, use message passing for orchestration #18

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

JohnStarich
Copy link
Collaborator

Closes #11

This is currently a huge refactor and a work in progress. Hopefully will suss out the major bugs soon 😅

@JohnStarich JohnStarich force-pushed the feature/web-workers-2 branch from 909d19d to 6c97ee7 Compare April 8, 2022 02:57
@JohnStarich
Copy link
Collaborator Author

Hey @gedw99, good to hear on the debugging side of things with tinygo. Mainline Go's support for debugging has been difficult to say the least. I do hope it improves.

This PR is so very close to being ready. Unfortunately, I'm continuing to have setbacks especially with regard to inter-worker communication. The latest build I have (may not be pushed here yet) is doing everything with web workers and works pretty well, but still has some issues with sharing file descriptors over pipes. Until those issues are overcome, I hesitate to merge them in as it would decrease reliability of the currently deployed version.

I'm maddeningly close – only thing holding me back right now is the lack of a useful debugger. Walking through individual Wasm instructions isn't my idea of fun 😅

This was referenced Oct 2, 2022
@JohnStarich
Copy link
Collaborator Author

Hey @gedw99! If it takes much longer, I may need to try tinygo instead. I'm feeling the sunk-cost fallacy pretty strongly right now 😂
It at least appears I'm close to done. There's some message passing issues (messages showing up out of order or duplicated) but that's essentially all I can see remaining.

Thank you for your words of encouragement ❤️

@amlwwalker
Copy link

hey @JohnStarich how is this going?

@JohnStarich
Copy link
Collaborator Author

Hey @amlwwalker, thanks for checking in. Not swiftly, unfortunately. Probably will be quite a while yet. I've hit several frustrating brick walls in the process of fixing this up. While I would love to say "going great, almost done", I don't want to give you the wrong idea – this likely won't be done for many more weeks.

Instead of giving up, however, I've been investing my time in fixing everything that's been slowing me down. Recently, I've been tackling the lack of tools for Go + Wasm. Specifically I'm making it possible to write more and higher quality automated tests with improvements to wasmbrowsertest (#41, #42) and Hackpad's underlying libraries (safejs, #8, #31). These are a critical part of my workflow, so hopefully this will be the catalyst we need.

It's very slow going, but I fully intend to root out these impossible-to-debug failures I'm hitting on this PR eventually!

@paralin
Copy link

paralin commented Mar 21, 2023

hi @JohnStarich looking forward to seeing this exciting work proceed. is there anything that I can help contribute to?

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.

Use Web Workers for true concurrency
3 participants