# Notification architecture

**URL:** <https://bisq.community/t/notification-architecture/3843>\
**Category:** Development\
**Created:** [December 15, 2017, 12:49pm UTC](https://bisq.community/t/notification-architecture/3843 "2017-12-15T12:49:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![citkane](https://bisq.community/user_avatar/bisq.community/citkane/32/1244_2.png) [@citkane](https://bisq.community/u/citkane)\
**Post date:** [December 15, 2017, 12:49pm UTC](https://bisq.community/t/notification-architecture/3843/1 "2017-12-15T12:49:44Z")

</div>

Continuing the discussion from [Deposit Transaction Still Did Not Get Confirmed](https://bisq.community/t/deposit-transaction-still-did-not-get-confirmed/3671/8):

Hi @christoph @ManfredKarrer

I am enjoying discussion on this platform and will see where it leads, if that is OK with yourselves (PS Christoph, Slack invite from you is no longer valid).

With reference to:

> <https://github.com/bisq-network/bisq/issues/1022>
>
> We would like to have a notification system so that users get informed about imp…ortant event from their Bisq app in other channels like a mobile app, email or others.
> 
> This has to be implemented in a way which protects the users privacy.
> An idea discussed with @cbeams and @ripcurlx is to use a http server running as hidden service where users send the notification events from the Bisq app and that service is set up to use notification infrastructure (Google, Apple push notifications, email,... ) to push the notification to the user. The user has to set up their "account" with that service where they connect a UUID with a mobile number (and/or email). A private key for encryption will be needed as well (pairing of GPG private key between Desktop app and mobile app can be done with a QR code). The Bisq app sends then a message on defined events like "open offer got taken" to the service and the the service sends the notification to the mobile number/email matching the UUID. 
> Those messages are encrypted.
> We could allow optional plain text, but the main message has to be encrypted so the service cannot derive information out of it. To use plain text (headline like "offer taken") would has the benefit that the mobile device can display that in lock screen. The encrypted message can only be decrypted once the user opens up the mobile Bisq app. The plain text feature would be optional.
> 
> The UUID and GPG private key should be decoupled from any other app data (onion address, encryption or signing key) to allow that the user can re-assign any time their UUID and key with a new mobile number or email address.
> 
> The registration of the UUID/mobile nr./email should be done from the Bisq app to benefit from the privacy provided by the hidden service.
> 
> For email the service operates an email service to send out the message to the registered email address matching the UUID. The user need to have GPG if he uses encrypted messages, otherwise he would only receive the optional plain text message.
> 
> The operators of the service is a BSQ contributor and get paid for his service. The role is bonded with BSQ. The can and should be multiple services and the message passing should circulate so that one service never receives all messages of a user (with plaintext there is a privacy issue).
> 
> Maybe we can find a solution to also provide privacy with the optional plain text messages? Any idea how to achieve that would be very welcome!
> 
> Tasks:
> \- Define and fine-tune concept, specially in regards to privacy
> \- Research notification infrastructure and requirements for Apple and Google.
> \- Research alternative notification infrastructure
> \- Research email notification
> \- Research implementation technology (native app or write once run everywhere frameworks)
> \- Build service node
> \- Build basic prototype for Android and iOS. 
>  
> This app could be the seed for a more sophisticated mobile app which adds trading features over time. So it should be taken into account this future perspective when selecting solutions.

> <https://github.com/mrosseel/bisq-proposals/blob/notification-proposal/bisq3.adoc>

I would like to propose a high level architectural alternative based on some existing software here: [http://twister.net.co/](http://twister.net.co/)

Twister functions as a decentralised, p2p “Twitter” using a blockchain. I tried it a few years ago and, technically, it worked a treat.

This may provide some ideas as to how “in-app” notifications could work more persistently and “recover” if a user closes the app or their network connection corrupts.

I will offer my opinion on “out of app” notifications. Personally, I will be comfortable with notifications using email or [https://www.signal.org/](https://www.signal.org/). This is based on my own, subjective feelings of trust and paranoia.

I cannot attest to the technical feasibility of connecting to “Signal”, but for the matter of email I think that this could be done without a centralised approach. Given that it is possible (?) for the Bisq client app to connect to a smtp server outside of the onion network, the approach could be simply to make it easy for users to purchase any number of independent smtp services in-app using Btc. People who already have a smtp service could just enter their own details. The challenged would be to find email providers who will sell services for Btc and then to automate the purchase and in-app setup. (One click setup for users)

This way there is no centralised point of potential failure. Every user has an independent contract with any number of email providers. The problem will arise that only one contractual party has availed of external notification, is offline with their Bisq client, and expects notifications to arrive. There could be two approaches to this scenario:

1. Before agreeing to a trade, the app shows clearly that there is no two party facility for external notifications. This could serve as an incentive for users to enable a service as they will be less attractive trading partners.
2. Using the “Twister” typology, the connection details of smtp (or other) is encrypted into the communication blockchain. The trade contract includes the clause that a trading partner will be allowed to use your connection anonymously.

I apologise in advance if these ideas are technically naive. I am an architect (academically of the bricks and concrete kind) who has strayed into the world of web development and UX/UI. I became interested in blockchain and bitcoin in 2011 and bittorrent, decentralised systems and FOSS before then.

---

<div class="post-metadata">

**Author:** ![christoph](https://bisq.community/user_avatar/bisq.community/christoph/32/1252_2.png) [@christoph](https://bisq.community/u/christoph)\
**Post date:** [December 18, 2017, 8:49am UTC](https://bisq.community/t/notification-architecture/3843/2 "2017-12-18T08:49:55Z")

</div>

Hi @citkane!

@slack invite link: [https://bisq.network/slack-invite](https://bisq.network/slack-invite) - I just tested it, works for me.

@communication: I saw that you have a github account. Would you mind moving the discussion on the notification to the issue @ManfredKarrer created ([https://github.com/bisq-network/exchange/issues/1022](https://github.com/bisq-network/exchange/issues/1022))? So all the involved parties are notified properly. What do you think?

Best,

Christoph

---

<div class="post-metadata">

**Author:** ![citkane](https://bisq.community/user_avatar/bisq.community/citkane/32/1244_2.png) [@citkane](https://bisq.community/u/citkane)\
**Post date:** [December 18, 2017, 9:37am UTC](https://bisq.community/t/notification-architecture/3843/3 "2017-12-18T09:37:46Z")

</div>

Thanks @christoph, I have copied the discussion onto GIT.

Here is a screen shot of what I am getting with the Slack link. I have tried it on a cleared cache as well:

 ![Screenshot-2017-12-18 Create account Slack](https://bisq.community/uploads/default/original/2X/7/7a2f966eddd9cd587051e726a5ab5e382e220671.png)

---

<div class="post-metadata">

**Author:** ![christoph](https://bisq.community/user_avatar/bisq.community/christoph/32/1252_2.png) [@christoph](https://bisq.community/u/christoph)\
**Post date:** [December 18, 2017, 9:50am UTC](https://bisq.community/t/notification-architecture/3843/4 "2017-12-18T09:50:13Z")

</div>

True - only tried it being logged in into Slack - will inform the owner of the link to update it. and thanks for moving the discussion to GitHub! 🙂
