简体   繁体   中英

Setup a P2P network using Interactor backend

From what I've read so far , Interactor offers flexible, simplified configuration for a client-server acrchitecture. But what if you want your network to be P2P?

Off the top of my head, I could make all nodes servers and clients, but it doesn't feel right. Any suggestion?

There are two answers to this question.

  1. Dynamic/Self configuration: It really depends on the underlying protocol being used for your P2P. Whether you are looking to implement centralized P2P or decentralized P2P infrastructure, underlying communication options between the components should be similar to your client-server architecture. If you select TCP/IP as the underlying protocol, you will need to create client and server interfaces between the components that need to interact with each other. However, benefit of using Interactor is that those client and server interfaces do not need to be preconfigured, but instead be configured dynamically at runtime. This way, there is minimal configuration required by each node to start with, and client-server communication is configured later whenever there is a need.

  2. Inter-interactor communication: While the feature is not available as of version 3.1.0,, all nodes will be configured to have inter-interactor communication with all of their peering nodes. You would not worry about client server configuration, instead, you would use a simple inter-interactor configuration listing out the target nodes that you want to peer with. This can also be configured dynamically at runtime.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM