User Tools

Site Tools


content:tech:serval_mesh_for_firefoxos

This is an old revision of the document!


Serval Mesh app for FirefoxOS

FirefoxOS is an attractive platform for Serval Mesh (app for Android) because it targets low-cost mobile devices and is likely to be adopted rapidly by vendors and carriers in developing countries who seek to avoid the compliance and commercial obligations imposed by Google, Apple and other platform suppliers.

A port of the Serval Mesh app to FirefoxOS would pose the following technical challenges:

  • the user interface (which for Android is written entirely in Java/XML using the Android API) would have to be rewritten in HTML5
  • interactions between Serval Mesh and the following FirefoxOS components would have to be made usable:
    • dialler screen for making and receiving calls
    • contact list for managing known Serval Identities
    • text message sending and receiving
    • app manager for auto-upgrade via Rhizome
    • gallery and camera for sending and receiving photos via Rhizome
    • file manager for sending and receiving files via Rhizome
  • the Serval DNA component could not be ported as a native executable because FirefoxOS does not and will never provide a native code facility
  • possibly the Emscripten C-to-JavaScript compiler could be used to port Serval DNA to FirefoxOS, but the following issues would have to be investigated to find out if this is feasible:
    • Serval DNA uses POSIX file operations for persistent storage of the keyring file, configuration, logging, daemon control, and temporary storage of Rhizome payloads. How would these be achieved within JavaScript on FirefoxOS?
    • Serval DNA uses SQLite for persistent storage of Rhizome bundles. On Android, the native SQLite code contributes signficantly to the APK binary size and necessitates a great deal of extra overhead for data indexing and consistency. This may not scale well to low-end devices if executed as JavaScript.
    • Cryptographic operations such as signature verification and payload encryption are performed on Android using the native NaCl library which has been optimised for the ARM processor. This optimisation brings Serval's security features within reach of low-end devices. If all crypographic operations must be executed as translated JavaScript code, how much CPU overhead will that entail? Would that make Serval Mesh for FirefoxOS unusable in practical terms due to slowness and battery drain?
content/tech/serval_mesh_for_firefoxos.1378264673.txt.gz · Last modified: 03/09/2013 20:17 by Andrew Bettison