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

Allow sharing memory across modules #22

Open
technosophos opened this issue Feb 8, 2021 · 2 comments
Open

Allow sharing memory across modules #22

technosophos opened this issue Feb 8, 2021 · 2 comments

Comments

@technosophos
Copy link
Contributor

Since we don't have networking, our best way to share information between two modules would be to share virtual files across multiple modules. That might require a new top-level object in the Wagi config.

@technosophos
Copy link
Contributor Author

To take another crack at explaining this, @bacongobbler and I were trying to figure out how to easily share data between multiple modules in the cases where they need to share data. Since WASI networking is not yet a thing, and since we're still a bit out from all of the nanoprocess-enabling features, a quick and dirty way of doing this is CSP-style via a pseudo-filesystem that is backed (potentially) by memory.

@bacongobbler
Copy link

bacongobbler commented Feb 8, 2021

To demonstrate a concrete use case: I am writing a retail application. There are two modules:

  1. /shop - a module that displays the current catalog to the user
  2. /cart - a module that displays every catalog item the user has added to their cart

I'd like to demonstrate how someone can add items to their shopping cart in one module and display the contents of their cart in another.

Another case might be a read/write scenario. One (or many) module(s) passively writes data, while another module reads from that data and presents it to the user. An aggregate syslogd accepting log streams from multiple modules would be one example (think logstash/graylog).

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

No branches or pull requests

2 participants