Improve ladder diagram and mark swarm `In Progress` (#86)

- Add dates and `Security and Privacy Implications` to README.md
This commit is contained in:
Pedro Pombeiro 2018-04-16 18:45:40 +02:00 committed by Pedro Pombeiro
parent d3c0339e0a
commit 6b22c1c99f
4 changed files with 142 additions and 74 deletions

View File

@ -12,7 +12,6 @@ Then submit a Pull Request in this repository.
Ideas looking for people
| Idea | Looking for | Swarm lead | In progress? | OKR prios |
|------|-------------|------------|--------------|----------------|
| #58 | Clojure dev | Adam | Yes | p1: p0 |
@ -22,16 +21,15 @@ Ideas looking for people
| #167 | Clojure dev | Oskar | No | p1: p3, p2: p0 |
| #167 | Go dev | Oskar | No | p1: p3, p2: p0 |
| #167 | QA | Oskar | No | p1: p3, p2: p0 |
>
# Idea Registry
## Idea Registry
An idea can be in the following states: draft, in progress, completed, or
aborted. Additionally, it can be in limbo which is when it isn't clear what
state it is in. An idea that has been in limbo for more than a week or so gets
aborted.
## In Progress :walking_man:
### In Progress :walking_man:
| Idea | State | Success metrics? | Exit criteria? | Clear roles? | Future iteration? |
|------------------------------------------------------------------------------------------------------------------------|---------------------------|------------------------|------------------------|------------------------|------------------------|
@ -51,8 +49,10 @@ aborted.
| [99-confidence](ideas/99-confidence.md) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes |
| [167-extended-automated-testing-for-continuous-delivery](ideas/167-extended-automated-testing-for-continuous-delivery) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes |
| [096-tribute-to-talk](ideas/96-message-tributes.md) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes |
| [086-push-notif-v2](ideas/086-push-notif-v2/README.md) | :walking_man: In Progress | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes |
### Draft :seedling: and limbo :question:
## Draft :seedling: and limbo :question:
| Idea | State | Success metrics? | Exit criteria? | Clear roles? | Future iteration? |
|-------------------------------------------------------------------|------------------|------------------------|------------------------|------------------------|--------------------------|
| [167-paid-master-nodes](ideas/167-paid-master-node.md) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :x: No | - :white_check_mark: Yes |
@ -63,12 +63,11 @@ aborted.
| [134-seamless-login](ideas/134-seamless-login.md) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes |
| [117-message-ordering](ideas/117-message-ordering.md) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :x: No | :x: No |
| [95-les-service-model](ideas/095-les-service-model/) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | :x: no |
| [86-push-notif-v2](ideas/86-push-notif-v2.md) | :seedling: Draft | :x: no | :x: no | :x: no | :x: no |
| [146-status-go-sdk](ideas/146-status-go-sdk/) | :seedling: Draft | :white_check_mark: yes | :white_check_mark: yes | :x: no | :x: no |
| [101-extensions](ideas/101-extensions) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | - |
| [142-recovery-compatibility](ideas/142-recovery-compatibility) | :seedling: Draft | :white_check_mark: Yes | :white_check_mark: Yes | :x: No | - |
## Completed :champagne: and aborted :dagger:
### Completed :champagne: and aborted :dagger:
| Idea | State | Success metrics? | Exit criteria? | Clear roles? | Future iteration? |
|---------------------------------------------------------------------|-----------------------|------------------------|------------------------|------------------------|--------------------|
@ -80,7 +79,7 @@ aborted.
| [1-offline-inboxing](ideas/1-offline-inboxing.md) | :champagne: Completed | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | - |
| [63-refactor-geth-packages](ideas/63-refactor-geth-packages.md) | :champagne: Completed | :white_check_mark: Yes | :white_check_mark: Yes | :white_check_mark: Yes | - |
## Commitment Registry
### Commitment Registry
Over any given iteration, individuals can be committed to 0..N ideas. This
registry captures this. It is only applied for In Progress swarms. This means it
@ -90,18 +89,19 @@ progress again. This ensures the registry is kept up to date.
| Contributor | Ideas |
|---------------|--------|
| @anna | 58, 80, 87, 127 |
| @adriacidre | 63, 146 |
| @adambabik | 58, 63, 68, 92 |
| @adriacidre | 63, 146, 86 |
| @alwx | 134 |
| @andmironov | 68, 80, 134 |
| @antdanchenko | 167 |
| @adambabik | 58, 63, 68, 92 |
| @alwx | 134 |
| @arash009 | 120, 122, 140 |
| @asemiankevich | 87, 127, 134, 167 |
| @cammellos | 87, 99 |
| @chadyj | 68, 80, 87, 99, 134 |
| @churik |140, 127 |
| @dmitryn | 99 |
| @dshulyak | 63, 92 |
| @feuGeneA | 83 |
| @EugeOrtiz | 140 |
| @flexsurfer | 34, 80 |
| @hesterbruikman | 80, 99, 134 |
| @janherich | 87 |
@ -110,17 +110,17 @@ progress again. This ensures the registry is kept up to date.
| @lukaszfryc | 68, 83, 99 |
| @mandrigin | 83, 99 |
| @martin | 120 |
| @martinklepsch | 140, 121 |
| @MaxRis | 34 |
| @naghdy | 120 |
| @nastya | 86 |
| @nikitalukianov | 99 |
| @oskarth | 120, 121 |
| @PombeirP | 86 |
| @rachelhamlin | 96, 151, 154 |
| @rcullito | 140 |
| @serhy | 87, 167 |
| @themue | 58, 92 |
| @vkjr | 34 |
| @yenda | 87 |
| @yenda | 87, 86 |
| @yevh-berdnyk | 80, 167 |
| @martinklepsch | 140, 121 |
| @rcullito | 140 |
| @EugeOrtiz | 140 |
| @arash009 | 120, 122, 140 |

View File

@ -0,0 +1,76 @@
digraph ladder {
ranksep="0.5"; nodesep="0.5"; splines="line"; ratio="0.5";
node [shape=point fontsize=10 fontname="Helvetica"];
edge [dir=none fontsize=10 fontname="Helvetica"];
// Column labels
a [shape=Square label="Contact A" style=filled color=lightblue];
w1 [shape=Square label="Arbitrary\nNotification Server"];
p [shape=Square label="Notification platform\n(e.g. FCM, Pushy)" style=filled color=lightgray];
b [shape=Square label="Contact B" style=filled color=lightgreen];
// Draw the 3 column headings, no line
{ rank=same; edge[style=invis] a -> w1 -> b -> p }
// Force rows to stay aligned
{ rank=same; edge[style=invis] a2 -> w1_2 -> b2 -> p2 }
{ rank=same; edge[style=invis] a3 -> w1_3 -> b3 -> p3 }
// Draw the columns
a -> a1 [style=dotted weight=1000];
w1 -> w1_1 [style=dotted weight=1000];
p -> p1 [style=dotted weight=1000];
b -> b1 [style=dotted weight=1000];
// Draw the vertical lines
a1 -> a2 -> a3 [weight=1000] a3 -> a4 -> a5 -> a6 [style=dotted weight=1000] a6 -> a7 -> a8 -> a9 -> a10 -> a11 [weight=1000] a11 -> amax [style=dotted weight=1000];
w1_1 -> w1_2 [weight=1000] w1_3 -> w1_4 -> w1_5 -> w1_6 [style=dotted weight=1000] w1_6 -> w1_7 -> w1_8 -> w1_9 -> w1_10 -> w1_11 [weight=1000] w1_11 -> w1_max [style=dotted weight=1000];
p1 -> p2 -> p3 -> p4 -> p5 -> p6 -> p7 -> p8 -> p9 -> p10 [style=dotted weight=1000] p10 -> p11 [weight=1000] p11 -> pmax [style=dotted weight=1000];
b1 -> b2 [style=dotted weight=1000] b2 -> b3 -> b4 -> b5 -> b6 [style=dotted weight=1000] b6 -> b7 -> b8 -> b9 -> b10 -> b11 [weight=1000] b11 -> bmax [style=dotted weight=1000 label=" App retrieves historic messages\nand matches ID"];
amax, w1_max, pmax, bmax [style=invis]
// Hide unused points
a5, b1, b2, b3, b4, b5, w1_5, p1, p2, p3, p4, p5, p6, p7, p8, p9 [style=invis height=0];
// Now each step in the ladder
{ rank=same; a1 -> w1_1 [dir=back label="Broadcasts availability to serve\nas notification server (1)"] }
{ rank=same; w1_1 -> b1 [dir=forward label="Broadcasts availability to serve\nas notification server (1)"] }
a2 -> w1_2 [dir=forward label="Sends anonymous Whisper message for registration request,\npassing device registration token and secure channel (SK1) (2)"];
w1_2 -> w1_3 [label=" Stores data for Contact A\n (device registration token, SK1)\nCreates AK2" weight=1000];
a3 -> w1_3 [dir=back label="Sends message over SK1 channel\naccepting request, and passing pubkey of AK2"]
a4 [label="" shape=none width=0 height=0 xlabel="Stores pubkey of AK2.\nAt this point Contact A and\n Arbitrary Notification Server #1 \ncan communicate securely,\nusing keys exchanged with server "];
{ rank=same; w1_4 -> b4 [dir=both label="Negotiation with PN servers,\nsame process as above for Contact A (...)"] }
a6 [xlabel="Contact A starts chat \nwith Contact B"];
{ rank=same; a6 -> b6 [dir=forward label="[NewContactKey]: Sends a contact request\nin the discovery topic, using B's public key for encryption\nand passing the new symkey that will be used for further comms.\nNEW: contains A's AK2 pubkey"] }
{ rank=same; a7 -> b7 [dir=back label="[ContactRequestConfirmed]: Responds to contact request.\nNEW: response contains B's AK2 pubkey"] }
a8 [xlabel="Contact A wants\nto send a message \nto Contact B"];
{ rank=same;
a8 -> b8 [dir=forward label="Sends message using common random topic"] }
{ rank=same;
a9 -> w1_9 [dir=forward label="Sends message over SK1 requesting a notification\nto Contact B passing B's AK2 pubkey over pre-defined topic"] }
{ rank=same;
w1_10 -> p10 [dir=forward label="Requests notification to be sent to Contact B's device\nusing stored device registration token"] }
{ rank=same;
b11 -> p11 [dir=back label="Sends a data push notification to Contact B's device\ncontaining hash of message payload as an ID"] }
// Add empty space at the bottom before legend
amax -> legend [style=invis weight=1000];
// Legend
{ legend [shape=plaintext label=<
<table border="0" cellborder="0" cellspacing="0">
<tr><td align="left">(1) Communication is done over a discovery topic provided by Status to the PN providers.<br align="left"/> Message includes pubkey of server's encryption key (AK1).<br align="left"/></td></tr>
<tr><td align="left">(2) Channel = random symmetric key + topic to have encrypted communication between peers
.<br align="left"/></td></tr>
</table>>] }
}

View File

@ -1,10 +1,10 @@
## Preamble
# Meta
Idea: 086
Title: Push Notifications v2
Status: Draft
Status: In Progress
Created: 2018-03-01
Q2 Objective: 1.2
Q2 Objective: #core 1.2
## Summary
@ -15,8 +15,7 @@ The [current push notification system](https://docs.google.com/document/d/1OgjnY
- Lead Contributor: @PombeirP (~20h/week)
- Testing & Evaluation: @nastya
- Contributor (Go): @adriacidre (24h/week)
- Contributor (Clojure): @yenda
- Contributor (QA): @nastya
- Contributor (Clojure): @yenda (20h/week)
## Product Overview
@ -43,9 +42,11 @@ We want to end up with a notification system which works on as many devices as p
We also want a solution that doesnt involve talking directly to the notification provider, as that would require keeping authentication elements embedded in the app (currently the case), and might expose us to quota theft.
### Flow Diagram
### Flow Diagram (1:1 chat)
![Alt text](https://g.gravizo.com/source/svg?https%3A%2F%2Fraw.githubusercontent.com%2Fstatus-im%2Fideas%2Fmaster%2Fideas%2F086-push-notif-v2%2Fdiagram.dot)
![Alt text](https://g.gravizo.com/source/svg?https%3A%2F%2Fraw.githubusercontent.com%2Fstatus-im%2Fideas%2Fmaster%2Fideas%2F086-push-notif-v2%2F1to1.dot)
For group chats, the flow is similar, but it's the chat admin which ensures that each chat member gets a notification channel for every other chat member. Notifications from chat members who left/were removed should be ignored.
### Goals
@ -69,11 +70,14 @@ At a high-level, we want to move up the current solution a notch regarding some
### Requirements & Dependencies
- [status-im/ideas#87](https://github.com/status-im/ideas/issues/87): In order to build on a stable foundation, we should make sure we start addressing this after the new communication protocol has landed.
- [status-im/status-react#3451](https://github.com/status-im/status-react/issues/3451): Preview notifications using background app refresh.
- [status-im/status-react#3488](https://github.com/status-im/status-react/issues/3488): Clicking message notification does not open the chat
- [status-im/status-react#3487](https://github.com/status-im/status-react/issues/3487): Notifications about previous messages should disappear when chat is opened
### Security and Privacy Implications
- It is possible for a third-party to easily exhaust the capacity of a Push Notification server by organizing a distributed attack to consume all the available slots. This should be resolved with paid notification servers.
## Exit criteria
There are undoubtedly enough issues identified to span several months of effort, so it seems reasonable to have a Swarm that tackles the problems which have the most impact on the user in the short term and leave the rest for a future Swarm to form around. There is value however in documenting the shortcomings of the current implementation, even if they are too far away on the horizon to be addressed in this Swarm (e.g., 3rd party PN provider support).
@ -89,23 +93,44 @@ KRs:
- 100% of the messages that should generate a notification on the receiving device do so within 15 seconds, under different network conditions (i.e. Wi-Fi, cellular).
- Network and battery consumption values are same or less than current values.
## MVP(s)
## Dates
- Single notification provider phase:
- Iteration 1: Show more information on notification (date: Beginning Of Work/BOW + 2w)
- Send only envelope hash on PN to destination device so that it knows to refresh messages and to match them to the notification.
- Update message body from retrieved Whisper message.
- Iteration 2: Implement notification server mode on `statusd` (date: BOW + 4w)
- Connects to FCM, only 1 instance, no load-balancing.
- Add logic to statusd (accept special P2P messages from clients, and trigger notifications in response).
- Deploy service with Ansible.
- Change client so that it communicates with notification server to send notifications indirectly to contact.
- Iteration 3: Support simple deep-linking (date: BOW + 6w)
- Open respective chat when taping on a notification.
- Hide notification when the user views the respective message in chat.
- Iteration X: TBD
- "Multiple notification provider" phase:
- TBD
### Minimum Viable Product
Goal Date: 2018-05-07
Description: Show more information on notification
- Send only envelope hash on PN to destination device so that it knows to refresh messages and to match them to the notification.
- Update message body from retrieved Whisper message.
### Iteration 1
Goal Date: 2018-05-21
Description: Implement notification server mode on `statusd`
- Connects to FCM, only 1 instance, no load-balancing.
- Add logic to statusd (accept special P2P messages from clients, and trigger notifications in response).
- Deploy service with Ansible.
- Change client so that it communicates with notification server to send notifications indirectly to contact.
### Iteration 2
Goal Date: 2018-06-04
Description: Support simple deep-linking
- Open respective chat when taping on a notification.
- Hide notification when the user views the respective message in chat.
### Iteration 3
Goal Date: TBD
Description: TBD
<!-- "Multiple notification provider" phase -->
## Supporting Role Communication

View File

@ -1,33 +0,0 @@
digraph ladder {
ranksep=".5"; nodesep="1"; splines="line";
node [shape=point fontsize=10];
edge [dir=none fontsize=10];
// Column labels
a [shape=Square label="Contact A"];
w [shape=Square label="Notification Server"];
b [shape=Square label="Contact B"];
// Draw the 3 column headings, no line
{ rank=same; edge[style=invis] a -> w -> b }
// Draw the columns
a -> a1 [style=dotted weight=1000];
w -> w1 [style=dotted];
b -> b1 [style=dotted weight=1000];
a1 -> a2 -> a3 -> a4 -> a5 [weight=1000];
a3 [xlabel="Contact A wants\nto send a message\nto Contact B" weight=1000];
w1 -> w2 -> w3 -> w4 -> w5 [weight=1000];
b1 -> b2 -> b3 -> b4 -> b5 [weight=1000];
// Now each step in the ladder
{ rank=same; a1 -> w1 [dir=forward label="Requests topic\nfor notifications\nto Contact B"] }
{ rank=same; a2 -> w2 [dir=back label="Replies with its Whisper topic"] }
{ rank=same;
w3 [shape=none style=invis width=0 height=0 label=""]
a3 -> w3;
w3 -> b3 [dir=forward label="Sends message\nwith agreed topic"] }
{ rank=same; a4 -> w4 [dir=forward label="Sends message using topic received"] }
}