dannycoates / abatar

A/B testing minion for node and browsers
1 stars 2 forks source link

Saving experiment state #6

Open dannycoates opened 9 years ago

dannycoates commented 9 years ago

I'm trying to keep the app API as simple as possible. After setting the subject context the app should only have to call ab.choose(variable) to get a value.

Behind the scenes ab needs to do something like this:

choose decision tree

The most complicated bit, "is this subject already in one?" requires some data storage and retrieval from "somewhere". Unless choose is asynchronous (which seems horrible) we need to load the subject's experiment data beforehand, either as an async initialization xhr request or ... bundled with the ab js file.

What data do we need to store?

I think all we need to store is the names of the experiments for the subject. Executing those experiments will yield the same results.

Experiment subject attributes can be fine grained but I think wrt persistence it would be a good idea to track a limited subset; I'm thinking a "user" based one stored on a server and a "browser" based one stored locally.

</ thinking aloud>

dannycoates commented 9 years ago

For my own memory I should note that the question "Is this subject already in one?" is important for handling conflicting experiments. For example:

dannycoates commented 9 years ago

I wonder if we could determine the answer to the "already in" question with the data available and a convention for experiment precedence?