nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
225 stars 49 forks source link

Node.js uvwasi team Meeting 2023-06-21 #211

Closed mhdawson closed 1 year ago

mhdawson commented 1 year ago

Time

UTC Wed 21-Jun-2023 18:00 (06:00 PM):

Timezone Date/Time
US / Pacific Wed 21-Jun-2023 11:00 (11:00 AM)
US / Mountain Wed 21-Jun-2023 12:00 (12:00 PM)
US / Central Wed 21-Jun-2023 13:00 (01:00 PM)
US / Eastern Wed 21-Jun-2023 14:00 (02:00 PM)
EU / Western Wed 21-Jun-2023 19:00 (07:00 PM)
EU / Central Wed 21-Jun-2023 20:00 (08:00 PM)
EU / Eastern Wed 21-Jun-2023 21:00 (09:00 PM)
Moscow Wed 21-Jun-2023 21:00 (09:00 PM)
Chennai Wed 21-Jun-2023 23:30 (11:30 PM)
Hangzhou Thu 22-Jun-2023 02:00 (02:00 AM)
Tokyo Thu 22-Jun-2023 03:00 (03:00 AM)
Sydney Thu 22-Jun-2023 04:00 (04:00 AM)

Or in your local time:

Links

Agenda

Extracted from uvwasi-agenda labelled issues and pull requests from the nodejs org prior to the meeting.

nodejs/node

nodejs/uvwasi

Invited

Observers/Guests

Notes

The agenda comes from issues labelled with uvwasi-agenda across all of the repositories in the nodejs org. Please label any additional issues that should be on the agenda before the meeting starts.

Joining the meeting

mhdawson commented 1 year ago

Minutes from the meeting today:

Node.js uvwasi team Meeting 2023-06-21

Links

Present

Agenda

Announcements

*Extracted from uvwasi-agenda labelled issues and pull requests from the nodejs org prior to the meeting.

nodejs/node

nodejs/uvwasi

Q&A, Other

Upcoming Meetings

Click +GoogleCalendar at the bottom right to add to your own Google calendar.

cjihrig commented 1 year ago

Tricky issue is related to streams is that it really wants you to run a callback, but challenge in uvwasi.

Is the problem that the WASI APIs are blocking? Just off the top of my head, you may be able to create a uv_loop_t only for WASI to use. Then, you could call uv_run() to spin that event loop until the operation completes. You would still need to use callbacks, but from the caller's perspective things would seem to be blocking.

Of course, another option is to use native sockets directly. That would be a bigger pain up front, but probably lower overhead once all the wrinkles were ironed out.

cjihrig commented 1 year ago

cc: @mhdawson in case ^ is relevant to #214

mhdawson commented 1 year ago

@cjihrig thanks for the ping, once the listen takes place, is ok to defer a uv_run() until sock_accept is called? If so then following your suggestion the sock_accept implementation might be able to simply call uv_run with the option to just run once followed by calling uv_accept and do this in a loop until uv_accept indicates that a connection has come in.

mhdawson commented 1 year ago

@ospencer ^ so you are aware of this discussion.

cjihrig commented 1 year ago

@mhdawson sorry for the delay - I was traveling. To answer your question, I'm not 100% sure, but I think so. What you're describing is how I envisioned things working.

mhdawson commented 1 year ago

@cjihrig seems to be working so far see - https://github.com/nodejs/uvwasi/pull/214. So far just the uvwasi_sock_accept is being run so not 100% sure getting a socket we can use but looking good so far.