deislabs / wagi

Write HTTP handlers in WebAssembly with a minimal amount of work
Apache License 2.0
884 stars 45 forks source link

A/B testing and similar "conditional loading" scenarios #104

Open technosophos opened 3 years ago

technosophos commented 3 years ago

Today Brendan suggested a feature that I think would be really cool:

He suggested "dyanmic overrides packaged as part of the request." He's thinking along the lines of Launch Darkly or A/B testing frameworks.

In the simplest case, you could merely select which module to run based on host headers. But Brendan suggested taking it even further and being able to specify a module in an HTTP header and have that loaded in the request (think like a Bindle reference where the runtime could verify the integrity of the package before loading).

Probably, we can start with loading conditionally off of a Bindle + HTTP header or A/B flag cookie. Then we could work out this second part.

itowlson commented 2 years ago

If we're still interested in features like this, we need to form a sense for how we want this stuff to compose and layer. We could certainly push this in at the WAGI layer, but does it truly belong there, or in Hippo, or in some intermediate layer (which might mean further splitting out the core WAGI engine from the configuration and routing layer)...?