Thursday, February 16, 2012

Requirements and restrictions

I made a list with the functional requirements of this project. Basically, this is what the system must do at the end:

  • The application is going to use the Internet connection, so the client should have one.
  • The client should have SQLite (it is already installed on every Android).
  • Database must be: scalable, replicable and accessible from cloud.
  • The user will be able to create/read/update/delete the data from the SQLite database.
  • The communication between the client and the server will be made through REST architecture.
  • The server will push information through C2DM, letting the client know that something has changed in the database. When receiving the message, the client will read the database from the server and modify his own accordingly.
  • The client will store only a part of the database which exists on the server (the most probable to be used data).
  • The system should make a difference between different connections
    • For example – when using GPRS the system should use cache and when using WiFi the system should not cache the data.
  • The user should be able to force relations between tables in the database.
  • The structure sent between the client and the server will be in JSON format.
    • The best way would probably be to use the GSON library to convert Java Objects in their JSON representation.
  • The client should support offline work.
    • When there is not an available Internet connection, the modifications will only be visible in the local database. When an Internet connection becomes available, the client should work with replication (send over the connection the modified data).
  • For solving the replication we chose the simplest approach, the client which last modified the data (the most recent timestamp) is the winner.

There are a number of restrictions that I will enforce at the beginning, so that I can cover the most simple application. When the most simple case is working, I will remove one restriction and go for a more complicated solution.
  1. The database stored in the cloud for one client fits entirely in the device memory.
  2. The cloud database can only be accessed by Android, so no other Operating System.
  3. There will not be 2 clients trying to modify the data at the same time - every time a client modifies something, the devices have time to synchronize.
  4. There will always be available an Internet connection.
  5. When a client modifies something in the local database, the whole database is copied on the server, so I will not use Delta updates.

No comments:

Post a Comment