Skip to content

ASAPHops

Thomas Schwotzer edited this page Aug 15, 2021 · 10 revisions

Main purpose of a routing protocol (OSI layer 3) is the allow data exchange between to entities which do not have a direct connection. A direct connection can be a cable made of e.g. copper, glass fiber. A direct connection can also be a wireless network like Bluetooth and Wifi-direct.

Public land mobile networks (PLMN) like LTE, 5G etc. are more complex systems. A mobile phone communicates with a base station. That is direct connection. Messages are routed through telecommunication providers network to receivers’ base station. We can assume that most networks are IP based. Using a PLMN is not different from using a Internet via a Wifi Router.

There is no chance to figure out what ways an IP package actual took. Why would we even like to know?

ASAP is different. It is an opportunistic protocol and takes any (point-to-point to be exact) connection available to disseminate messages. It also takes Internet of course. ASAP apps would work without Internet access without any changes anywhere in your code. ASAP apps are quite resilient.

ASAP provides your application with the trace of each single message. Why? We do not know. But if your app is interested – this library provides the means. If not, ignore it.

message received

Let's have again a look into our ASAPMessageReceivedListener.

void asapMessagesReceived(ASAPMessages messages, String senderE2E, List<ASAPHop> asapHops) throws IOException;

This method is called each time a new new chunk of messages are received from another peer. We already discussed ASAPMessages but not the other two parameters.

Second parameter provides peer ID of message originator. This peer created this message in the first place. The third parameter is a list of all steps (hops) from this orignal sender to this receiving peer. Each step is described in some details with an object of ASAPHop

Clone this wiki locally