everywhere-computer / roadmap

The roadmap for the Everywhere Computer
https://everywhere.computer
3 stars 0 forks source link

HTTP request gateways #2

Open depatchedmode opened 11 months ago

depatchedmode commented 11 months ago

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

bmann commented 11 months ago

Submitted by @matheus23

matheus23 commented 11 months ago

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.