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

reasonable wasm? #12

Open
bollwyvl opened this issue Apr 26, 2022 · 5 comments
Open

reasonable wasm? #12

bollwyvl opened this issue Apr 26, 2022 · 5 comments

Comments

@bollwyvl
Copy link

Thanks for reasonable!

It would be lovely to use reasonable in the browser (and maybe on the server): oxigraph has proven quite effective there, and may have some patterns worth copying... if indeed it wouldn't be possible to use them directly together. Unfortunately, I don't know how one would go about this!

Semi-tangentially, by wrapping it in JS, it's possible pyodide, a wasm-based python distribution, could make use of it more rapidly, as a working python+rust toolchain in the browser is still a bit further off.

@gtfierro
Copy link
Owner

Hi @bollwyvl! I totally agree --- indeed, I've been using in-browser oxigraph for tools like https://gtfierro.github.io/223p-web-sparql/ and https://sparql.gtf.fyi/.

I've been holding off on producing the WASM version of reasonable because I wanted to develop a better solution for storing the intermediate relations which can take up a lot of memory. It also isn't currently able to take advantage of Oxigraph's existing storage of triples. However, now I'm thinking that these aren't critical blockers and that it would be worth putting together the JS/WASM interface to reasonable so we can at least see how it performs. I"ll see what I can do! It's nearing the end of the semester here so I'll be pretty busy but I'll see what I can put together over the next couple weeks

@gtfierro
Copy link
Owner

gtfierro commented Aug 9, 2022

Hi @bollwyvl -- sorry for the delay on this, but I've finally got reasonable compiling to WASM here: https://github.com/gtfierro/reasonable/tree/wasm/reasonable-wasm. I have to divert attention to other things for a little while, but there is a "Context" class that can accept triples, pass them to reasonable, and return the newly materialized triples. I'll see if I can write up a simple example soon

@bollwyvl
Copy link
Author

I emoted earlier, but just wanted to say thank you for pursuing this.

Not to distract from the Other Things (I know how that goes), but do you imagine this deploy its own oxigraph, or would somehow work with an existing oxigraph "vm"?

@gtfierro
Copy link
Owner

Hi @bollwyvl -- great question. I've currently moved to oxrdf and rio to handle the RDF model and I/O to avoid the heavy dependency on RocksDB via oxigraph. I think it wouldn't be too terrible to support pulling triples from an Oxigraph store; there will be an in-memory copy of those triples due to the way this is currently implemented. Would that be ok in the near-term?

@bollwyvl
Copy link
Author

Haven't been able to play in the space in a while, so not sure what the ramifications are fully!

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