Team Algol

From mn/ifi/inf5750
Revision as of 00:25, 30 November 2015 by Tomasliv@uio.no (talk | contribs) (Work schedule)

Jump to: navigation, search

Team Algol : Android Messenger application for DHIS2

Group members

  • Vladislav Georgiev Alfredov <vladisla@ifi.uio.no>
  • Tomáš Livora <tomasliv@student.matnat.uio.no>
  • Mathias Ciarlo Thorstensen <mathiact@ifi.uio.no>
  • Hans Fredrik Fahle <hansffa@student.matnat.uio.no>
  • Jiader Chou <jiaderc@ifi.uio.no>

Summary of Requirements

  1. Reduce data usage
    • Implement local data storage
    • Implement local data caching
  2. Redesign user interface to follow Material design guidelines

Architecture

  1. Android application
    • REST calls to DHIS2 for authentication and user information
    • XMPP messaging
    • Google cloud services communication ?
  2. DHIS2 instance
  3. XMPP server (previously: https://github.com/niclashalvorsen/DHISOpenfire and:https://github.com/niclashalvorsen/Openfire-DHISAuthentication)
  4. Google Cloud services on DHIS2 server ? (https://github.com/niclashalvorsen/DHIS2-GCMSupport)

Architecture

Project details

Importing to android studio:

  1. Open android studio.
  2. Click import project
  3. Select Gradle project.
  4. Find the "build.gradle" file inside the app folder and select it.

(This way you use the gradle plugin from android studio)


Details about how we will solve the task, and component-like view of it go here...

  1. Go over the libraries and decide which is worth using: (time to implement the functionality ourselves + testing vs the resource cost of using the library + going over the library interface
  2. Rest interface/layer redesign.
    • Rest Session storage? Use Persistance layer or Cache layer ?
    • How would the rest calls hit/miss the cache?
    • Is the DHIS2 api satisfactory ?
  3. Persistance layer
    • Use the OrmLite library ?
    • Store data on app start/exit
    • Provide interface for the Rest Layer
  4. Cache layer.
    • If requested object in memory return it. If not use persistance layer to get it. + pre-fetch bulk data from disk? If not on disk return null, informing that it is not cached.
    • Load chunks of cache in memory ? What happens if the app runs on really old android device that has very little ram ?
  5. Go over all the ui and redo it to use Material design. Maybe use butterknife for activities as well ?
  6. Test the app. Test all the corner cases.

Work schedule

  1. Milestone (8th November)
    • Analysis of previous solution
    • Work planning according to the findings
  2. Milestone (22nd November)
    • Run own instance of DHIS2 (all)
    • Update REST API calls, use ReactiveX library and reduce the number of calls and amount of data transfered (Mathias and Jiader)
    • Fix Openfire DHIS authentication library and run Openfire XMPP server (Tomas)
    • Storage/Cache: Fix problem with long reopening of the application and improve local storage (Vladislav)
      • Analyze XMPPSessionStore.[done]
      • Compare RESTClient to XMPPClient.[done]
      • Go trough Activities, Fragments and anonymous asynchronious tasks that relate to REST calls and caching. [done]
      • Implement RESTSessionStorage class and methods to set/get *Model lists of objects/objects [in progress]
      • Refactor XMPPSessionStorage if nessesary [todo: not yet nessesary]
      • Store the cache to disk [todo: have to find apropriate points in the code to indicate exiting or store on every .destroy() call & load on every .onCreate()/Constructor call]
      • (?Milestone for completion(refactoring if nessesary) of XMPP cache, REST cache and the apropriate storage of both cache objects 29.11.2015)
    • Improve GUI using Butter Knife and Material design (Hans)
  3. Milestone (4th December)
    • Run own instance of DHIS2 with GCM extension
    • Update Smack client library (Tomas)
    • Run DHIS with Openfire on publicly accessible server (Tomas)
    • Stabilize the application
    • Measure traffic usage
    • Write unit tests for every component of the application
    • Use log in screen (and maybe other things) provided by DHIS2 Android SDK

How to run the application

Follow the instructions. If you do not want to run your own local server, skip first two steps and choose address 88.80.187.109 (our testing server) from the list.

  1. DHIS Server
    • download DHIS 2 Live package
    • unzip it somewhere on your machine
    • run the script based on your platform (either dhis2-live.exe or startup.sh)
  2. Openfire XMPP Server
    • clone Openfire-DHISAuthentication repository
    • build the project using Maven (dhis.provider-1.0.0-SNAPSHOT.jar should be created in target directory)
    • download the latest Openfire server for your platform
    • run the installer or unzip the archive
    • copy dhis.provider-1.0.0-SNAPSHOT.jar generated before to openfire/lib directory
    • copy ~/.m2/repository/net/iharder/base64/2.3.8/base64-2.3.8.jar to openfire/lib directory
    • run Openfire from openfire/bin directory (./openfire start for Linux systems)
    • go to Openfire Admin Console and go throught the basic setup if you want
    • go to System Properties and change provider.auth.className to org.hisp.dhis.provider.DHISAuthProvider
    • restart the server (./openfire restart for Linux systems)
    • make sure your firewall does not block port 5222
  3. DHIS Messenger for Android
    • clone DHISmessenger repository and open the project in Android Studio
    • build and run the application (either using Android Emulator or your Android smartphone)
    • make sure your phone is connected to the Internet
    • in the application enter your computer's external IP address (you can find it with ifconfig command on Linux systems)
    • log in using username admin and password district

Group organization

  • Source code (dhis2msg organization on GitHub)
  • Weekly in-person meetings
    • group sessions (Group 1, Tuesday 10:15 - 12:00)
    • during or after the lecture (Thursday 12:15 - 14:00)
  • Online communication
    • Slack service for real-time group comunication
    • GitHub issues for discussing larger changes

Assignment text

Can be found at: https://www.uio.no/studier/emner/matnat/ifi/INF5750/h15/group-projects/messenger-app/index.html