Difference between revisions of "Mobile Protocol specification"

From Bitmessage Wiki
Jump to navigation Jump to search
(Created page with "This is a DRAFT for protocol extensions to enable mobile devices to participate in bitmessage communication. === intension === if you want to let mobile devices participate ...")
 
m (added headers)
Line 1: Line 1:
 +
{{Template:Stub}}
 +
 +
{{Template:Proposal}}
 +
 
This is a DRAFT for protocol extensions to enable mobile devices to participate in bitmessage communication.
 
This is a DRAFT for protocol extensions to enable mobile devices to participate in bitmessage communication.
  

Revision as of 22:02, 27 April 2014

This is a DRAFT for protocol extensions to enable mobile devices to participate in bitmessage communication.

intension

if you want to let mobile devices participate in bitmessage communication, you need a gateway device. Theoretically the device could participate like a standard node, but this will cause too much traffic. Even if you have a flat rate, it'll cost to much battery. This page describes a way, the standard protocol could be enhanced, to let mobile devices participate, at least through a gateway.

the gateway

The gateway first of all is a standard bitmessage node. As a bitmessage node it connects to other nodes and collects and exchanges objects. The mobile gateway functionality is an extension, an additional protocol variant.

When a mobile device connects to a gateway it will identify itself in the "services" field of the version message to be a mobile device. The gateway will answer in the same field, that it is a gateway.

Therefore the service table has to be enhanced:

Value Name Description
1 NODE_NETWORK This is a normal network node.
2 NODE_MOBILE This is a mobile device with limited bandwidth.
4 NODE_GATEWAY This node can send reduced traffic and work as a gateway.

The differences in protocol behavior

sending messages

When accessed by a NODE_MOBILE the NODE_GATEWAY will not send any "addr" message, because the NODE_MOBILE will connect to the bitmessage network only through well known gateways. It will neither send a "inv" message, because it wants to reduce the traffic to the NODE_MOBILE.

When accessed to a NODE_GATEWAY the NODE_MOBILE will not send a "addr" message, too. But it might send an "inv" message, when it has objects to share. and it can share already all types of objects with the network.

With this very small protocol changes the NODE_MOBILE is already able to send messages using the bitmessage protocol, but with very reduced traffic load.

receiving messages

For the receive direction we must bring the NODE_GATEWAY in the position to select the objects the NODE_MOBILE is interested in. Whenever the NODE_GATEWAY notifies, that NODE_MOBILE might be interested in objects, it sends a "inv" message to offer them (must only the objects, NODE_MOBILE is interested in!).

How does NODE_GATEWAY know, which objects are of interest. There are different possibilities to notify this. First of all: every "getpubkey" object is translated into a request. When the object arrives at NODE_GATEWAY or if its already there, it is offered in an "inv" message.

For "msg" and "broadcast" objects it's a little more complicate, because the NODE_GATEWAY has to make the decision. We must add an encrypted method, how the NODE_GATEWAY can get the secret keys of NODE_MOBILE.