This is the proposal to make the new server to handle the API requests. This new server(at this time, I call it 'API Server') can serve the client-side APIs requests. With API Server, SEBAK will only do the consensus and its data will be simple and it's operations also will be lighter than now.
The major features of API Server are,
- Serve data query of client
- Relay transactions from client
Data
| SEBAK |
API Server |
block.Block |
block.Block |
transaction.Transacion |
transaction.Transacion |
block.Account |
block.Account |
|
block.BlockOperation |
|
block.BlockTransaction |
SEBAK will only handle the core data for consensus and the others will be owned by API Server.
Specifications
- Client-side network protocol:
http2
- SEBAK-side network protocol:
jsonrpc
- API query:
REST(current) and GraphQL
- Storage:
LevelDB
When APIs Server starts,
- Check SEBAK is alive
- Get the node information from SEBAK
- check the latest block
- Load block from SEBAK
- Create additional data from the loaded blocks
- All the block is completed, API Server serves API
- Open the streaming channel of SEBAK
When a new block is created at SEBAK,
- The
jsonrpc of SEBAK supports the streaming
- API Server opens the streaming channel of SEBAK
- When a new block is created, API Server can receive the new block fro the streaming channel
This is the proposal to make the new server to handle the API requests. This new server(at this time, I call it 'API Server') can serve the client-side APIs requests. With API Server, SEBAK will only do the consensus and its data will be simple and it's operations also will be lighter than now.
The major features of API Server are,
Data
block.Blockblock.Blocktransaction.Transaciontransaction.Transacionblock.Accountblock.Accountblock.BlockOperationblock.BlockTransactionSEBAK will only handle the core data for consensus and the others will be owned by API Server.
Specifications
http2jsonrpcREST(current) andGraphQLLevelDBWhen APIs Server starts,
When a new block is created at SEBAK,
jsonrpcof SEBAK supports the streaming