Introducing OpenPush A Free, Decentralized Push Messaging Framework - - PowerPoint PPT Presentation

introducing openpush
SMART_READER_LITE
LIVE PREVIEW

Introducing OpenPush A Free, Decentralized Push Messaging Framework - - PowerPoint PPT Presentation

Introducing OpenPush A Free, Decentralized Push Messaging Framework for Android Marcus Hoffmann - bubu@bubu1.eu 1 / 31 About Me Hi, I'm Marcus! Free software developer from Berlin. Working on a free Android ecosystem. F-Droid core


slide-1
SLIDE 1

Introducing OpenPush

A Free, Decentralized Push Messaging Framework for Android Marcus Hoffmann - bubu@bubu1.eu 1 / 31

slide-2
SLIDE 2

About Me

Hi, I'm Marcus! Free software developer from Berlin. Working on a free Android ecosystem. F-Droid core contributor and maintainer. 2 / 31

slide-3
SLIDE 3

Push Notifications

One of the key missing pieces for apps on F-Droid Server sending unsolicited content to an app on your phone Used for SPAM marketing purposes But also essential for any kind of instant messaging or VoIP client 3 / 31

slide-4
SLIDE 4

How?

Q: How do you send unsolicited content? 4 / 31

slide-5
SLIDE 5

How?

Q: How do you send unsolicited content? A: It's not really unsolicited. The client keeps a connection open. 5 / 31

slide-6
SLIDE 6

How?

Q: How do you send unsolicited content? A: It's not really unsolicited. The client keeps a connection open. Problem: Keeping a connection open requires maintenance (energy). 6 / 31

slide-7
SLIDE 7

How?

Q: How do you send unsolicited content? A: It's not really unsolicited. The client keeps a connection open. Problem: Keeping a connection open requires maintenance (energy).

Keeping an open connection for every app is not a great idea.

7 / 31

slide-8
SLIDE 8

Status Quo

Currently there's Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM) Firebase is a proprietary platform owned by Google Requires Google Play Services being present on the device AND requires each app to include a proprietary library to receive push notifications. 8 / 31

slide-9
SLIDE 9

Status Quo

Currently there's Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM) Firebase is a proprietary platform owned by Google Requires Google Play Services being present on the device AND requires each app to include a proprietary library to receive push notifications. All your messages are sent to to google Your FOSS apps aren't FOSS anymore Riot, Conversations, Firefox, Jami, RocketChat, Nextcloud, ... No decentralization possible 9 / 31

slide-10
SLIDE 10

Decentralized Systems and FCM

Sending messages through FCM requires a developer key This key is tied to an APK 10 / 31

slide-11
SLIDE 11

Decentralized Systems and FCM

Sending messages through FCM requires a developer key This key is tied to an APK All push messages from self-hosted services need to go through another centralized instance which holds the FCM key. 11 / 31

slide-12
SLIDE 12

Decentralized Systems and FCM

Sending messages through FCM requires a developer key This key is tied to an APK All push messages from self-hosted services need to go through another centralized instance which holds the FCM key. Or you need to distribute your own APKs as a platform host. 12 / 31

slide-13
SLIDE 13

Alternatives?

Everyone builds their more or less reliable custom solution Some protocols can do it reasonably well in-band (like XMPP) But Android makes it increasingly hard to run background tasks Battery life is still horrible 13 / 31

slide-14
SLIDE 14

OpenPush Goals

  • 1. Free Software: Including server, client and client library parts
  • 2. Decentralized: You can run your own instance.
  • 3. User is in Control

Smartphone user chooses pusherver instance. User decides which apps are allowed to subscribe to push notifications.

  • 4. No developer key required

Used by Google for accounting and possibly abuse mitigation. Provide a service to users not app developers, so we don't need accounting there Find other methods for abuse mitigation 14 / 31

slide-15
SLIDE 15

Architecture

App Wants to receive push notifications. Talks to a webservice. 15 / 31

slide-16
SLIDE 16

Architecture

App Wants to receive push notifications. Talks to a webservice. Webservice Receives a pushtoken from an app. Sends pushes to specific instances of an app via a pushserver. 16 / 31

slide-17
SLIDE 17

Architecture

App Wants to receive push notifications. Talks to a webservice. Webservice Receives a pushtoken from an app. Sends pushes to specific instances of an app via a pushserver. Pushserver Provides an API for a pushclient to register for push notifications Hands out a pushtoken for every app registration Provides the API for receiving push messages from a webservice 17 / 31

slide-18
SLIDE 18

Architecture

App Wants to receive push notifications. Talks to a webservice. Webservice Receives a pushtoken from an app. Sends pushes to specific instances of an app via a pushserver. Pushserver Provides an API for a pushclient to register for push notifications Hands out a pushtoken for every app registration Provides the API for receiving push messages from a webservice Pushclient: Handles app registration Keeps an open connection to a pushserver. Distributes push messages to apps. 18 / 31

slide-19
SLIDE 19

Architecture

19 / 31

slide-20
SLIDE 20

Current Status

Pushserver OpenAPI Spec ===> ~Done ✔ 20 / 31

slide-21
SLIDE 21

Current Status

Pushserver OpenAPI Spec ===> ~Done ✔ Server implementation in Python ===> Done ✔ 21 / 31

slide-22
SLIDE 22

Current Status

Pushserver OpenAPI Spec ===> ~Done ✔ Server implementation in Python ===> Done ✔ Android Client implementation ===> WiP 22 / 31

slide-23
SLIDE 23

Current Status

Pushserver OpenAPI Spec ===> ~Done ✔ Server implementation in Python ===> Done ✔ Android Client implementation ===> WiP Android Client library = ==> WiP 23 / 31

slide-24
SLIDE 24

Current Status

Pushserver OpenAPI Spec ===> ~Done ✔ Server implementation in Python ===> Done ✔ Android Client implementation ===> WiP Android Client library = ==> WiP Integration into other Systems ===> ToDo! 24 / 31

slide-25
SLIDE 25

Implementation details

Pushclient <--> Pushserver

Currently using Server-Sent Events. Deliberately transparent to users of OpenPush, so we can experiment with different protocols. 25 / 31

slide-26
SLIDE 26

Implementation details

Pushclient <--> Pushserver

Currently using Server-Sent Events. Deliberately transparent to users of OpenPush, so we can experiment with different protocols.

Pushclient

Currently a standalone Android app. Possible integration with MicroG in the future. Connection kept alive by using a foreground service (or being a system app). Client library communicates via Android IPC mechanisms (bound service and broadcast intents). 26 / 31

slide-27
SLIDE 27

Outlook

Integration into server and client apps (Nextcloud, Matrix, RocketChat) 27 / 31

slide-28
SLIDE 28

Outlook

Integration into server and client apps (Nextcloud, Matrix, RocketChat) Adding E2EE From Webservice to a users phone. Essential if you want to to host public pushervers 28 / 31

slide-29
SLIDE 29

Outlook

Integration into server and client apps (Nextcloud, Matrix, RocketChat) Adding E2EE From Webservice to a users phone. Essential if you want to to host public pushervers Experimenting with different transports 29 / 31

slide-30
SLIDE 30

Outlook

Integration into server and client apps (Nextcloud, Matrix, RocketChat) Adding E2EE From Webservice to a users phone. Essential if you want to to host public pushervers Experimenting with different transports Having existing systems provide the OpenPush APIs I.e. Pusherver API provided by an XMPP/Matrix server Apps register for push notifications with your existing XMPP/Matrix app 30 / 31

slide-31
SLIDE 31

Acknowledgements

The original development of the OpenPush project was sponsored by the German Federal Ministry of Education and Research through the Prototype Fund program.

Find more info at https://bubu1.eu/openpush

31 / 31