Student : Anubhav Sharma
Project : Research on Peer to peer data transfer
Organization : Google FHIR SDK
Mentor : Ephraim Kigamba
The Android FHIR SDK currently does not supports transferring of data without the internet(Offline capabilities), as the app is intended to be used in areas that can be far from network reach, and in this condition, we wanted to transfer the data without the internet to another device.
By working on this project, the data could be shared to a nearby device without having a dependence on the internet. Currently, for GSoC, we have limited ourselves to researching and exploring various methods available to us.
Issue : #258: [R&D] Peer to peer sync capabilities
We have worked on two demo applications which were based on wifi-direct API and nearby connections API-based library and tried to draw the comparison.
These applications were then tested for transfer, connectivity, etc., and the analysis of the basics is written.
Research Goals
- Research on various technologies that would serve as the base for further development.
- Develop Proof of Concept for different technologies that emerge in Research.
- Further documentation regarding the Detailed Research can be found at Research Document
- Sample applications regarding the research are attached below.
- Research Guidelines
Sample Applications
- This application is based on Wifi-direct and the project was originally forked from Google Git
- For further reference on the Technology Wifip2p
- Application APK can be found here
- Location needs to switch on, otherwise will throw Discovery failed: 0
- Advantages
- Faster than Android P2p Sync, Since Nearby Connection API may fall back to Bluetooth for transfer
- Does not require an intermediate access point.
- Can handle large data easily
- Encrypted WPA2
- During testing, tranfer speed varies between 2-3 MB
- Disadvantages
- Since we are using the API there is a lot of boiler code to be written, many edge cases to be covered.
- Implementation is time-consuming.
- Manual configuration changes for Wi-Fi-direct.
- This application is based on Nearby Connection api which is further developed into a library by OpenSRP.
- For testing purposes, Android FHIR SDK reference was integrated with the android-p2p-sync library can be Found here
- While integrating the library there were few issues with Jacoco and hence Jacoco was removed, attaching the link for intrigratable branch of android-p2p-sync library.
- Application APK can be found here
- Advantages
- Easy to integrate to SDK.
- Library already has its Database and it keeps track of the last record that has been send and thus all the capabilities that are required for syncing are satisfied.
- Reduces steps like manual switching wifi/ Bluetooth.
- Authentication before transfer.
- Library's Database is encrypted hence secure.
- Disadvantages
- Sometimes the devices will not connect. (Reason not known)
- Technology seems like a black box since the developer cannot decide how the data will be transferred, or on what basis it will use Bluetooth / wifi.
- As Nearby Connection can fall back to using Bluetooth, sending larger files may take a long time.
Decide on the technology to use and further develop and integrate it with SDK.