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

HTTP request gateways #2

Open
depatchedmode opened this issue Dec 13, 2023 · 2 comments
Open

HTTP request gateways #2

depatchedmode opened this issue Dec 13, 2023 · 2 comments
Assignees
Labels
request New feature or request

Comments

@depatchedmode
Copy link
Contributor

Feature Description

HTTP request gateways allow hosting an IPVM service at a given URL. I can upload a Wasm file to activity-irish-pub.everywhere.app that knows how to handle and respond to arbitrary HTTP requests. I also set up the request gateway with my account & my homestar nodes (either hosted or on my machine locally?).

When I POST activity-irish-pub.everywhere.app/user/philipp, the HTTP request gateway translates this request into an IPVM workflow that is submitted to my local homestar node, which computes the response and gives it back to the gateway.

Use Cases

As an app developer, I don't want to develop my app against the JSON-RPC interface of homestar.

In some cases, I can't choose the protocol that clients support. E.g. when trying to implement an ActivityPub server on top of IPVM. (or any other specification that requires specific formats for HTTP requests)

Signals of Success

It's possible to write an app against e.g. a normal HTTP REST API, but use your local homestar node to serve responses.

We could see how many requests are served by request gateways.

Current Workarounds (optional)

The current workaround would be to deploy your own HTTP webserver that translates HTTP requests into IPVM workflows and homestar JSON-RPC requests.

Evidence of Value (Optional)

This was not something that I have heard anyone ask for specifically, this is just something that Philipp would love to see/expect to be needed/useful for tapping in to an existing ecosystem (HTTPS).

A request-based pricing model with a free tier may be possible?

Val Town has "HTTP Vals":

HTTP Vals let you expose an API or website from your val.

They are built on the web-standard Request and Response objects, so are compatible with a number of web frameworks like Hono and Peko.

These handlers need to export a function that takes a Request object as the first parameter and returns a Response object. The function can be asynchronous.

https://docs.val.town/types/http/

Suggested Implementation (Optional)

No response

Job Stories (Optional)

No response

Additional Context (Optional)

No response

@depatchedmode depatchedmode self-assigned this Dec 13, 2023
@depatchedmode depatchedmode added fresh Requests that haven't been triaged or responded to yet. request New feature or request labels Dec 13, 2023
@depatchedmode depatchedmode removed the fresh Requests that haven't been triaged or responded to yet. label Dec 13, 2023
@bmann
Copy link

bmann commented Dec 21, 2023

Submitted by @matheus23

@matheus23
Copy link

We could try to build the thing described in "Current Workaround" for something as an experiment to see what's needed & how it feels.
I'm guessing it's probably easier to build if we have a cloud-hosted homestar node but bonus points if it also works with a local one!
And then we can take that prototype and (if easy/worth it) generalize it to a product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants