OONI oonimkall
Author | @bassosimone |
Last-Updated | 2020-07-09 |
Status | historic |
Abstract. We describe our plan of replacing Measurement Kit for OONI Probe Android and iOS (in particular) and (also) the CLI.
Introduction
We want to write experiments in Go. This reduces our burden compared to writing them using C/C++ code.
Go consumers of probe-engine shall directly use its Go API. We will discuss the Go API in a future revision of this spec.
For mobile apps, we want to replace these MK APIs:
We also want consumers of measurement-kit’s FFI API to be able to replace measurement-kit with probe-engine.
APIs to replace
Mobile APIs
We define a Go API that gomobile
binds to a Java/ObjectiveC
API that is close enough to the MK’s mobile APIs.
FFI API
We define a CGO API such that go build -buildmode=c-shared
yields an API reasonably close to MK’s FFI API.
API for running experiments
It seems the generic API for enabling running experiments both on mobile devices and for FFI consumers is like:
This should be enough to generate a suitable mobile API when
using the gomobile
Go subcommand.
We can likewise generate a FFI API as follows:
This is close enough to measurement-kit’s FFI API that a few lines of C allow to implement an ABI-compatible replacement.
Other APIs of interest
We currently don’t have plans for replacing other MK APIs. We will introduce new APIs specifically tailored for our OONI needs, but they will be out of scope with respect to the main goal of this design document.
measurement_kit command line client
We replace the measurement_kit
CLI tool with miniooni
,
which will use the ~same set of CLI flags for QA reasons.
History
The initial version of this design document lived in the measurement-kit namespace at GitHub. It discussed a bunch of broad, extra topics, e.g., code bloat that are not discussed in this document. More details regarding the migration from MK to probe-engine are at measurement-kit/measurement-kit#1913.