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

Feature/boilerplate #853

Draft
wants to merge 89 commits into
base: master
Choose a base branch
from
Draft

Feature/boilerplate #853

wants to merge 89 commits into from

Conversation

bassosimone
Copy link
Contributor

Checklist

  • I have read the contribution guidelines
  • reference issue for this pull request:
  • if you changed anything related how experiments work and you need to reflect these changes in the ooni/spec repository, please link to the related ooni/spec pull request:

Description

Please, insert here a more detailed description.

This mechanical refactoring moves model.Engine to the model
package. This changce is functional to subsequent changes to
more easily generate and maintain existing experiments.
Like the previous commit, here the idea is to move things around
in a mechanical fashion before working on more substantial changes.
Here the idea is that the logic for creating an experiment lives in
internal/registry along with a list of experiments.

In turn, this design will allow us soon to make it very easy to add a
new experiment, by making each experiment register itself.

However, before doing that, I need to refactor the code so that
each experiment and the engine can both import from registry.

    +---------------+                 +--------+
    | An experiment |                _| engine |
    +---------------+               | +--------+
              |                     |
              |                     |
              |      +----------+   |
              `----->| registry |<--.  imports
          imports    +----------+

Once the above is possible, then each experiment can register itself.
This design allows us to automatically add new experiments by
writing files in the proper package.
Also, make it opportunistic rather than measuring each time.

So, we'll have some more measurements.
Conflicts:
	go.mod
	internal/measurexlite/trace.go
Conflicts:
	internal/measurexlite/conn.go
	internal/measurexlite/dialer.go
	internal/model/archival.go
1. adapt the template to allow for collecting the data we need

2. recognize that support for cookies is optional, so it should
probably always be there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant