-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The general idea here is to let folks define a js module to use as a data source for a "sender." This could be general purpose but the initial use case is for polling APIs that don't expose webhooks. By using `fetch` to issue HTTP requests, we can track state in the module itself to decide if the data is worth sending a webhook for. Example: <https://github.com/svix-onelson/poller-input-poc/blob/main/fetcher.js> There are many barriers to integrating the code in the POC linked above which need to be cleared first. We need: - a custom module loader to let us source modules from the bridge config instead of js files on disk. - Glue code to connect the `op_forward` deno extension calls to either a transformation or svix sender output. - existing transformation code in bridge needs to be refactored to allow us to use "newer deno" without also introducing a memory leak. For the latter, <svix/monorepo-private#5670> aims to solve this. In addition to the above, deno ops (i.e native extension code) are supposed to be able to register state with the runtime, but I wasn't able to get it to work for keeping track of which worker was which (allowing us to propagate payloads to the appropriate output).
- Loading branch information
1 parent
c4c606b
commit 4e94dda
Showing
2 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters