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

Research shipping GeoIP DB as asset files on mobile apps #2828

Open
hellais opened this issue Dec 9, 2024 · 2 comments
Open

Research shipping GeoIP DB as asset files on mobile apps #2828

hellais opened this issue Dec 9, 2024 · 2 comments
Assignees

Comments

@hellais
Copy link
Member

hellais commented Dec 9, 2024

This will allow us to move forward with the engine simplification work and enable us to not have to do app releases so often.

@hellais hellais added ooni/probe-mobile issues related to OONI Probe mobile priority/medium labels Dec 9, 2024
@hellais hellais added the epic label Dec 9, 2024
@sdsantos
Copy link

@hellais There should be nothing stopping us from shipping the GeoIP DB files as assets inside the probe-multiplatform app. The main changes would be in the engine I imagine. We just need to provide the engine with a path or input stream to the files.

But that wouldn't stop us from releasing the app less often. Maybe it would help to release updates to the engine less often.

To have fewer app releases, we would need to not only ship the GeoIP DB files, but also update them remotely from the apps.

@sdsantos
Copy link

Investigated a bit more. Android can't provide a file path from inside the APK file, while iOS can. Android can share a java.io.FileDescriptor.

Ideas:
a) Share a FileDescriptor and somehow implement that for iOS;
b) Share a common interface for how to read the file chunks of bytes (similar to an InputStream);
c) We copy the file to the app files directory and then provide a path (space wasted);
d) If the file already needs to be extracted someway by the engine, the app can do it instead, and then provide a path(s) to the extracted contents;
e) We read and hold the contents in memory, and pass that to the engine (I imagine this isn't feasible because they are large files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants