hackpad icon indicating copy to clipboard operation
hackpad copied to clipboard

Implement core of Node.js `net` module for servers

Open ghost opened this issue 4 years ago • 7 comments

Hey, I understand that you are primarily a go programmer but is there any way with which you can implement this for running Nodejs??

ghost avatar Sep 30 '21 12:09 ghost

I hope one day hackpad will support Node.js or other language runtimes. I'm not sure how close it is today since I haven't looked into the Node.js runtime yet.

I do know StackBlitz has gotten there already, with a very similar strategy to hackpad.

JohnStarich avatar Oct 11 '21 04:10 JohnStarich

Hey I also know about stackblitz I was looking towards this cuz it is open source

ghost avatar Oct 11 '21 10:10 ghost

Thinking about it more today, hackpad does support some of the Node.js API today, but not all of it yet.

@Innovativenut Is there a specific set of APIs in Node.js that you'd like to see in Hackpad? If you have a list in mind, that'd be very helpful. Otherwise this issue may be a bit too broad to be actionable.

JohnStarich avatar Oct 17 '21 04:10 JohnStarich

Hey @JohnStarich I actually don't have any specific APIs. Yes, I understand that it will be hard to work. If you can't work on this can you please tell me how you used the original go source code to build this so I can do so with nodejs. And did you modify the go source code and the mount it to the Virtual OS or is it the exact source code?

ghost avatar Oct 17 '21 11:10 ghost

I actually don't have any specific APIs.

Ok, in that case I’ll go ahead and close this issue. We can continue discussion here if you like, but I think we’d need to narrow it down in new issues.

It’s not that I can’t work on it, it’s just too broad. I’m unable to implement the entire Node.js spec at once, so a specific list of missing features would be best. Today we’ve implemented files and processes, but that was a huge undertaking on its own. (See the Medium article on the README for more on the complexity.)

can you please tell me how you used the original go source code to build this so I can do so with nodejs.

All of the build steps are included in the Makefile if you’re curious 👍

The Go source did require some modifications for everything to work. Namely in unimplemented syscalls (starting processes was deemed nonsense for browsers, for example). Those changes are here in our fork: https://github.com/hack-pad/go These modifications were made to the fork’s Go standard library, so hackpad had to be specially compiled to use them.

Hope that helps! 🙂

On Oct 17, 2021, at 6:26 AM, Innovativenut @.***> wrote:

 Hey @JohnStarich I actually don't have any specific APIs. Yes, I understand that it will be hard to work. If you can't work on this can you please tell me how you used the original go source code to build this so I can do so with nodejs. And did you modify the go source code and the mount it to the Virtual OS or is it the exact source code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

JohnStarich avatar Oct 17 '21 17:10 JohnStarich

Hey Sorry to reopen this but can you please try to implement the http and net modules using the web workers? Thank You in advance 😊

ghost avatar Oct 24 '21 16:10 ghost

We can try 🙂 I'll open this up and rename to match. Let's set the scope to net for now, as that's probably the core piece.

My time is limited, so anyone can pick this up. We can discuss design here.

JohnStarich avatar Jan 24 '22 06:01 JohnStarich