fermyon / developer

This is the home for developer.fermyon.com
https://developer.fermyon.com
Apache License 2.0
53 stars 69 forks source link

Add a "Concept" article on outbound requests #365

Open tpmccallum opened 1 year ago

tpmccallum commented 1 year ago

At present, whilst single outbound requests are supported; neither Spin nor Cloud supports being able to run multiple concurrent outgoing requests.

This includes Redis, Postgres, MySQL, Key/Value and HTTP requests.

This could present a limitation to a user who is planning on building their application on Spin/Cloud. The following paragraph is a little more information Re: time/resources/practicability of having multiple concurrent outgoing requests supported.

One plan is to add first-class support for structured concurrency (which is needed for concurrent outgoing requests) to the WASI Component Model and WASI Preview 3. The timeline for such a task to be completed could take at least one year.

In the meantime, if concurrent outgoing requests are a high priority, then we could potentially emulate concurrent outgoing HTTP requests using WASI Preview 1 or 2 polling (a WASI API for waiting for I/O events on multiple handles).

tpmccallum commented 1 year ago
dicej commented 1 year ago

Also note that as of yesterday, the official wasi-http proposal has support for concurrent outbound requests: https://github.com/WebAssembly/wasi-http/pull/3#discussion_r1116383159, so we'll want to adopt that when it's ready. It still won't reflect the long term vision for asynchronous WASI, but it will be a big step in the right direction.