aeternity / AEXs

Aeternity expansions repository — application layer standards
10 stars 25 forks source link

AEX-2: With what network topologies it is compatible? #40

Closed davidyuk closed 5 years ago

davidyuk commented 5 years ago

Original issue: It is intentioned to work with two peers transports or transports with multiple actors?

If the first one, then why do we need identification? If the second one, then can APP-2 introduce itself as APP-1 by intercepting of id that wallet has send to APP-1 in wallet.request.connect method call?

Would be great to add requirements/expectations about transport to AEX-2.

shekhar-shubhendu commented 5 years ago

question too vague and does not defines things that it can be processed further. please be more descriptive and provide few examples and use cases for both the scenarios.

davidyuk commented 5 years ago

In general, Wallet and Aepps communicate in some network that should have a specific topology that depends on the transport used. Let's check possible topologies.

Star network topology (Wallet is in the middle)

In this case, the Wallet can exchange messages with Aepp directly, so I don't see reasons for identification in this case, as far as it should be already implemented by transport.

Bus network topology

Wallet and several aepps connected to the same bus (all messages are broadcasted). In this configuration, AEX-2 is not working because Wallet can't send wallet.request.connect request to specific aepp.

Is there any other network topologies that are compatible with AEX-2?

shekhar-shubhendu commented 5 years ago

Defining the transport layer incl. connection set up between wallet and aepp is currently out of scope and will not be added to the AEX.

davidyuk commented 5 years ago

I think AEX-2 should at least require an ability to send and receive JSON documents between aepp and wallet, doesn't it? Is a direct connection between wallet and aepp required or not?

If you say "direct connection required" then the most of the transport layer stuff will become "out of scope". But right now, AEX-2 has some pretension to be able to work in other environments that should be investigated.

davidyuk commented 5 years ago

@shekhar-shubhendu can you confirm that the current version of AEX-2 requires a direct connection (without third parties connected to the same bus) between aepp and wallet?

shekhar-shubhendu commented 5 years ago

yes and no. For AEX-2 to work there should be a direct connection and you can see it in the reference implementation provided. For AEX-2 to set up connection, depends from case to case. for eg. in case of browser extension the wallet needs to do a broadcast message for the apps to detect it and initiate a direct connection.

davidyuk commented 5 years ago

Can an extension send a message to a particular tab? Or you mean that inside of browser tab, there can be several aepps?

shekhar-shubhendu commented 5 years ago

Let's take a simple case and don't go with the multiple aepps in a single tab(but as per the design the aex-2 will support that too)

davidyuk commented 5 years ago

Ok, thank you!