The components of RightMesh

Jason Ernst
RightMesh

--

Following up on our recently released detailed technical roadmap, this post provides more detail about each part that makes up RightMesh. Subsequent posts will describe each the particular pieces we are working on, how far we have gotten on them, and where the development is headed.

RightMesh Framework

The first major component is the RightMesh Framework. The framework encapsulates the boundary between apps and the RightMesh service. It is the main part of RightMesh that developers of RightMesh apps and developers of Superpeers should be focused on. This is the defined functions, interfaces, classes, intents, Android Interface Definition Language (AIDL) that lets apps do things like:

  • connect to the service
  • receive peer events (peers joining, leaving)
  • receive data events (data received, data transmission progress)
  • receive encryption events (key exchange successful)
  • send data
  • disconnect from the service
RightMesh Framework

The RightMesh Control Application Programming Interface (API) is meant for things like 3rd party wallets or apps which may wish to give their users more of a white label feel of RightMesh. This would, for example, let an app which uses the Control API turn off Wi-Fi or Bluetooth in RightMesh, without the user having to open up the normal RightMesh control app that ships with RightMesh (it allows for a more seamless experience for their users).

If the RightMesh device using the RightMesh Service is a RightMesh Superpeer, there are two additional functionalities for balancing payment channels:

  1. open and fund a payment channel to a remote peer
  2. close / cashout the payment channel to a remote peer

Note that a RightMesh Superpeer is really just a special type of RightMesh app, run on a device with open ports, and ideally a reliable, fast Internet connection. For developers, it is not much different building a java RightMesh Superpeer from a java RightMesh app.

RightMesh Library

If we zoom out farther, we can see the RightMesh Library. This includes the RightMesh Service, which is the main executable code of RightMesh. It must be present on every device which is running RightMesh. Only one copy of the RightMesh Library must be present on the device. RightMesh apps and Superpeers use the RightMesh App API to connect to the RightMesh Service.

RightMesh Library

The RightMesh Service contains all of the logic for RightMesh Networking. There is only ever one copy of the RightMesh service running, even though there may be many RightMesh apps on a single phone. Multiple phones communicate with each other by using the RightMesh Networking portion of the RightMesh Service which is where all the protocols and mechanisms are implemented. Autonomous connectivity runs within the Service and manipulates the Wi-Fi and Bluetooth devices on the phone so that phones can make 1-hop connections with each other. Network protocols running in the Service then perform peer discovery, routing, and data transmission. RightMesh payment channel handling code is also implemented in the service, and this overlaps with the RightMesh networking protocols because the payment channel signatures are attached to each data packet. On a Superpeer, autonomous connectivity is not really used; however, all the RightMesh protocols aside from that are used to communicate between the Superpeers and the phones.

In the early stages of our development, the RightMesh License allows us to limit developers on RightMesh apps to those we have approved for early access. It also ensures that apps are operating on separate mesh ports which makes it more difficult for an app to attempt to receive traffic meant for another app. The mesh ports are encoded into the license which is cryptographically signed by our Developer Portal and verified by the RightMesh App API when a RightMesh app starts. The RightMesh Control API lets the RightMesh Control app do things like set the price the user is willing to pay for data or turn on / off Wi-Fi, Wi-Fi direct, and Bluetooth.

RightMesh Platform

RightMesh Platform

The RightMesh Platform contains:

  • all of the RightMesh apps we have developed on github
  • our reference implementation of the RightMesh Superpeer
  • our developer portal resources
  • the tools we use internally to build and publish the library so that external developers can use it (artifactory for example)
  • and tools we use to perform testing and performance evaluation of RightMesh with

The platform also includes the RightMesh Controller. This is a set of activities on Android that lets a user control the RightMesh Service. The RightMesh Controller is packaged with the RightMesh Service and is what is distributed to end-users of RightMesh apps.

RightMesh Ecosystem

RightMesh Ecosystem

The RightMesh Ecosystem includes all of the third party additions to RightMesh, which at this time would be RightMesh apps built by 3rd party partner developers, and 3rd party Superpeers which are built by the community. We anticipate there will be 3rd party Superpeers which provide the ability for ad, app and content distribution into RightMesh. There will also be 3rd party Superpeers which are built to receive data from users of apps, from IoT devices, or sensors which make use of RightMesh as a delivery network for data.

It is also possible that there could be 3rd party RightMesh Controllers which would be apps which would like to incorporate ways in which the user can do things like turn on / off Wi-Fi, Wi-Fi Direct, Bluetooth, or change their data pricing directly within their own app rather than through the RightMesh version.

In summary, this post has attempted to shed light on some of the components of RightMesh and to clarify how they fit into the parts we are building ourselves and parts that 3rd party developers will be able to build, and what exactly will be running on RightMesh devices. A common understanding of the pieces will make it easier for the community to ask questions about particular parts and for us to give progress updates on each part as we work on it.

My next post will start the series on the particular pieces we are working on. Until then, I invite you to join our conversation on Telegram, and I will be pleased to answer your questions there

--

--

Jason Ernst
RightMesh

Senior software engineer working on robotics. interested in mesh networks and decentralization