[ADR] Caching

This commit is contained in:
Dat PHAM HOANG
2021-10-05 17:10:31 +07:00
committed by Dat H. Pham
parent 2362b5ad55
commit 54b63cfa61
2 changed files with 47 additions and 0 deletions
@@ -0,0 +1,19 @@
# 1. Record architecture decisions
Date: 2021-10-05
## Status
Accepted
## Context
We need to record the architectural decisions made on this project.
## Decision
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
## Consequences
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools).
+28
View File
@@ -0,0 +1,28 @@
# 2. Caching
Date: 2021-10-05
## Status
Accepted
## Context
- Client always make requests to back-end to refresh the data, what put a lot of pressure on it.
- User need to wait a long time to see the mailbox and email.
## Decision
- Caching the data with the [Hive](https://github.com/hivedb/hive) dependencies
Hive is a lightweight and blazing fast key-value database written in pure Dart. It support cross-platform: mobile, desktop and browser
- `changes` method allows a client to efficiently update the state of data (Mailbox and Email)
## Consequences
- Minimizing the requests to the back-end
- Reducing the latency in the client
## Follow up works
- Pre-loading the bodies of the some latest unread messages