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

[common] Consolidate SearchEngine class for android and desktop through adapter parameters #1002

Open
gubatron opened this issue Feb 14, 2023 · 0 comments

Comments

@gubatron
Copy link
Collaborator

gubatron commented Feb 14, 2023

Currently we have on Android:
https://github.com/frostwire/frostwire/blob/master/android/src/com/frostwire/android/gui/SearchEngine.java

and on Desktop:
https://github.com/frostwire/frostwire/blob/master/desktop/src/com/limegroup/gnutella/gui/search/SearchEngine.java

Implementation discrepancies exist, for instance in how Settings are saved to determine whether a SearchEngine is enabled or not because the user checked or not the search engine in the settings screen.

Consolidate common functionality and make specific functionality parameters to the SearchEngine class

Serializing Active/Inactive Search Engines

The SearchEngine class should perhaps have a SettingsAdapter passed as a parameter when constructed, and then we implement a SettingsAdapter for Android and another for Desktop.

Another important difference between the current implementations is how FrostWire for Desktop and FrostWire for Android interact with Telluride, the video search tool.

Telluride Interaction

On Desktop, currently, it starts a local http server and the search performer talks to it with a simple HTTP-JSON interface.
On Android, we have a TellurideCourier which makes use of a Python runtime that invokes the Telluride library in python land and then brings the search data to java land.

This too can perhaps be adaptable through a common interface, or perhaps we can think of a TellurideCourier that works by instantiating the telluride executable each time, it would be simpler and perhaps not that slow after the first invocation of this process. It would at least free the memory that a Python runtime must be holding on too while it's running as an HTTP server.

@gubatron gubatron changed the title [common] Consolidate SearchEngine [common] Consolidate SearchEngine class for android and desktop through adapter parameters Feb 14, 2023
@gubatron gubatron self-assigned this Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant