-
Notifications
You must be signed in to change notification settings - Fork 0
/
design.wsd
41 lines (36 loc) · 891 Bytes
/
design.wsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@startuml
participant batchReporter as b
participant cache as c
participant "local/memory" as l
==new==
[x->b:load
b->l:async hooks.load, get all the data from local
c<-l:sync data to cache
==push data==
[o->b:push
b->c:insert
c->l:async hooks.dump with the whole cache
l->l:if failed, retry
==continuous synchronization to remote==
[o->b:start
group interval send data to remote
c->o]:interval request
group request success
c->c:clear cache
c->l:hooks.dump empty to local
end
group request failed
c->c:won't dump data to local, and wait for the next time of data change
end
end
==last synchronization==
[x->b:lastChanceToSync
c->o]:something like sendBeacon, when pageHide
group successfully queued the data for transfer
c->c:clear cache
c->l:dump empty to local
end
group Unsuccessfully queued the data for transfer
c->c:do nothing
end
@enduml