Основные фейлы при
блокчейн-разработке и как
их избежать.
Borgardt Alexander
Data Flow
And
Dynamic network
Borgardt Alexander
Node
Node
Node Other
Node
Other
Node
Other
Problems:
● Self-ddos
● Not find help yourself.
Static network state
and
flat topology.
Static network state
and
flat topology.
Dynamic network structure
and
Complex topology.
Dynamic network structure
Bonus
Bonus
Flat Topology
Node
Node
API
Component
Node
P2P
API
Component
Node
P2P
API
Component
Chain
Node Node
Other
P2P
API
Component
Chain
Node Node
Other
P2P
API
Component
Chain
Dynamic network structure
Dynamic State
Dynamic network structure
Dynamic State
DHT
Dynamic network structure
balancing algorithm
Dynamic State
DHT
Dynamic network structure
Multicast/
Geocast
balancing algorithm
Dynamic State
DHT
Dynamic network structure
Multicast/
Geocast
balancing algorithm
Dynamic State
DHT
Network and data flow problems.
Symptoms of the problem.
Node Node
Other
P2P
API
Component
Chain
Node Node
Other
P2P
API
Component
Chain
Node Node
Other
P2P
API
Component
Chain
Node Node
Other
P2P
API
Component
Chain
Node Node
Other
P2P
API
Component
Chain
The Problem of Data Flows
The Problem of Data Flows
HTTP vs WebSocket
The Problem of Data Flows
HTTP vs WebSocket
+ JsonRpc 2.0
The Problem of Data Flows
HTTP vs WebSocket
+ JsonRpc 2.0
{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:3},
”id”:10
}
The Problem of Data Flows
HTTP vs WebSocket
+ JsonRpc 2.0
[
{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:3},
{ ”Id”:10
“jsonrpc”:2.0, },
”method”:”get-block”, …,
“param”:{“id”:3}, {
”id”:10 “jsonrpc”:2.0,
} ”method”:”get-block”,
“param”:{“id”:3},
”id”:10
}
]
Node Node
Other
P2P
API
Component
Chain
HTTP Node Node
P2P Other
HTTP
Component
Router
Chain
HTTP Node Node
P2P Other
HTTP
Component
TimeOutRouter
Chain
HTTP Node Node
P2P Other
HTTP
Component
Router
Chain
HTTP Node Node
P2P Other
HTTP
Component
Router
ThreadPool Chain
HTTP Node Node
P2P Other
HTTP
Component
TimeOut Router
ThreadPool Chain
WebSocket Node Node
Other
HTTP
Component
Query
Processor P2P
Chain
Manger
Query
WebSocket Node Node
Other
HTTP
Component
Query
Processor P2P
Chain
Manger
Query
HTTP
Component
Manger
Query
“3f08ec8a-b9b6-11e8-94ec-720004e611d0”:{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:3},
”id”:10
}
“5ce34250-b9b6-11e8-94ec-720004e611d0”:....
“5ce34250-b9b6-11e8-94ec-720004e611d0”:{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:270},
”id”:12
}
WebSocket Node Node
Other
HTTP
Component
Query
Processor P2P
Chain
Manger
Query
Query
Processor
Manger
Query
“3f08ec8a-b9b6-11e8-94ec-720004e611d0”:{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:3},
”id”:10
}
“5ce34250-b9b6-11e8-94ec-720004e611d0”:....
“5ce34250-b9b6-11e8-94ec-720004e611d0”:{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:270},
”Id”:12
“status”:”wait”
}
WebSocket Node Node
Other
HTTP
Component
Query
Processor P2P
Chain
Manger
Query
WebSocket Node Node
Other
HTTP
Component
Query
Processor P2P
Chain
Manger
Query
WebSocket Node Node
Other
HTTP
Component
Query
Processor P2P
Chain
Manger
Query
Query
Processor
Manger
Query
“3f08ec8a-b9b6-11e8-94ec-720004e611d0”:{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:3},
”id”:10
}
“5ce34250-b9b6-11e8-94ec-720004e611d0”:....
“5ce34250-b9b6-11e8-94ec-720004e611d0”:{
“jsonrpc”:2.0,
”method”:”get-block”,
“param”:{“id”:270},
”Id”:12
“status”:”go”
}
WebSocket Node Node
Other
HTTP
Component
Query
Processor P2P
Chain
Manger
Query
The Problem of Data Flows
The core of the problem
Node Node
Other
P2P
API
Component
Chain
API P2P
Chain
API P2P
business logic Storage
API P2P
k
Bloc
business logic Storage
API P2P
k
Bloc
Change Set
business logic Storage
API P2P
k
Bloc
Change Set
business logic Storage
API P2P
k
Bloc
Change Set
business logic Storage
API P2P
k
Bloc
Change Set
business logic Storage
Node
API P2P
Chain
interface
business logic Storage
Node
API P2P
Chain
Connector Connector
business logic Storage
Node
Read Write
API P2P
Chain
Connector Connector
Manager
Query
business logic Storage
WebSocket Node Read Node
Other
Write
HTTP
Component
Query
Processor P2P
Read
Write
Read Chain
Manger
Query
Borgardt, Alexander
[Link]@[Link]
kotbegemot
[Link]
[Link]
[Link]