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

feat(swingset): add subprocess+node -based VatManager #1387

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

warner
Copy link
Member

@warner warner commented Aug 7, 2020

This adds a new managerType named 'subprocess-node', which runs Node.js
in a subprocess, and sends it netstring-wrapped JSON-encoded Delivery/Syscall
objects to drive the vat.

It currently has the same limitations as the thread-based worker:

  • vatPowers is missing transformTildot
  • metering is not implemented at all
  • delivery transcripts (and replay) are not yet implemented

In addition, it does not yet use a blocking read for syscall responses, so it
can not yet invoke devices. However, unlike the thread worker, blocking reads
should be possible for a subprocess, so eventually we will have this ability.

refs #1374

@warner warner added the SwingSet package: SwingSet label Aug 7, 2020
@warner warner self-assigned this Aug 7, 2020
@warner warner requested a review from FUDCo August 7, 2020 07:50
@warner warner force-pushed the 1374-vatworker-subprocess-node branch from df51422 to e392559 Compare August 7, 2020 19:00
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

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

Seems like a straightforward extrapolation from #1386, though it amplifies my earlier concerns about the tension between on the one hand allowing host-specific stuff to support disparate hosts and on the other hand having good modularity. In particular, once we are supporting XS it's probably not going to be good for people doing stuff on Node to have to import a bunch of XS stuff and vice versa, which looks like the trend line this is on.

This adds a new `managerType` named `'subprocess-node'`, which runs Node.js
in a subprocess, and sends it netstring-wrapped JSON-encoded Delivery/Syscall
objects to drive the vat.

It currently has the same limitations as the thread-based worker:

* vatPowers is missing transformTildot
* metering is not implemented at all
* delivery transcripts (and replay) are not yet implemented

In addition, it does not yet use a blocking read for syscall responses, so it
can not yet invoke devices. However, unlike the thread worker, blocking reads
should be possible for a subprocess, so eventually we will have this ability.

refs #1374
@warner warner force-pushed the 1374-vatworker-subprocess-node branch from e392559 to 184c912 Compare August 7, 2020 19:45
Base automatically changed from 1384-vatworker-thread to master August 7, 2020 20:01
@warner warner merged commit 184c912 into master Aug 7, 2020
@warner warner deleted the 1374-vatworker-subprocess-node branch August 7, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants