-
Notifications
You must be signed in to change notification settings - Fork 0
Textric Routing Protocol
This document attempts to describe how Textric routes messages. It covers from send, through route, to delivery at the endpoint destination.
As detailed elsewhere in this Wiki, the originating device (i.e., the sender) will construct a payload that, at the bare minimum, contains the userID of the intended recipient. This is sent as a POST request to the server, using the fingerprint generated during device enrollment.
Keep in mind; only authenticated devices can send, so we implicitly know the sender's identity.
The server will lookup the user, and then fire off copies to each of the user's devices, assuming they are listening. Ideally, this is done by iterating through active connections...
We'd probably also send push notifications; something like APNs or FCM. So we'll need to keep some other bits of information about the user in this case. Alternatively, at least for APNs, we could even send a background notification...?
Regardless, if an app isn't listening, we'll queue it on the server instead. How long do we keep it? Good question...
In the meantime, the client app has a web socket connected to our server; we pump it down the web socket, and then read it from there and do what we do best!