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

feature: native execution #389

Closed
ra0x3 opened this issue Dec 5, 2022 · 0 comments · Fixed by #425
Closed

feature: native execution #389

ra0x3 opened this issue Dec 5, 2022 · 0 comments · Fixed by #425
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@ra0x3
Copy link
Contributor

ra0x3 commented Dec 5, 2022

Background

  • This is a sort've skunkworks idea
  • Currently the indexer only supports WASM execution -- which is great for running untested code and allowing users to upload bundles of assets to a remote index operator in order to not have to run their own node
  • However, WASM execution can be a little frustrating and unnecessary in some contexts:
    • If I'm not running untrusted code, I don't need that benefit of WASM
    • If I'm not packaging my indices as bundles and deploying them to a remote service, I don't need that benefit of WASM
    • There are so so many cool/interesting crates that simply don't compile to WASM (e.g., Redis, RocksDB, some websocket crates, etc)
  • WASM is great for the current use case and we shouldn't change anything about WASM execution
    • WASM should still be the main frame of reference when thinking about the indexer
  • However, if I'm a Rust dev that wants more custom functionality - I don't want to be limited to just WASM execution

Proposal

  • I propose that we add a new method of execution "native"
  • Native execution would be similar to WASM execution in that it is an execution method for indexing data, however there would be a few differences

Implementation

  • Previously I tried making WASM/native almost exactly the same Add native execution #359
    • This was great in that the APIs looked the exact same to the dev
    • However, persisting data to the database becomes an issue using this method of native execution -- WASM execution caches the database connection in the WASM runtime, unlike native execution where we don't really have anywhere to stash the database connection
      • I'm open to revisiting this implementation if anyone has any ideas for it
  • The current implementation I suggest is that users run "native execution" as a simple binary that registers executors
    • The Fuel indexer service is invoked via the fuel-indexer binary.
    • This binary just creates and registers executors via a supplied manifest file
    • Native execution would just require running your own binary where you create your own executors and register them -- super simple
  • Native execution would not require any "new" functionality
    • The functionality for native execution already exists.
    • What we would do is merely show users how to user the indexer API in order to make the service execution run "natively"
@ra0x3 ra0x3 self-assigned this Dec 5, 2022
@ra0x3 ra0x3 changed the title Native execution feature: native execution Dec 5, 2022
@ra0x3 ra0x3 mentioned this issue Dec 5, 2022
16 tasks
@ra0x3 ra0x3 added the documentation Improvements or additions to documentation label Dec 10, 2022
@ra0x3 ra0x3 linked a pull request Dec 15, 2022 that will close this issue
3 tasks
@ra0x3 ra0x3 mentioned this issue Dec 16, 2022
3 tasks
@ra0x3 ra0x3 added this to the Beta-3 milestone Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant