Distributed storage solution based on MetaID

1 Introduction

In the context of large blocks, data will become larger and larger, and many people still have a lot of questions about large blocks. Based on this, we designed and implemented ShowMANDB data distributed storage to deal with the era of big data.

In fact, when the amount of data becomes large enough in the future, remote single-point data acquisition and processing will become difficult. The huge amount of data will cause business processing to become slower and slower, and distributed storage and processing become more and more useful. necessary. Today we will introduce MetaID-based distributed storage solutions, ShowMANDB, AppMANDB and LocalMANDB.

2. ShowMANDB

ShowMAN is ShowPay MetaID Accessing & Networking, which aims to facilitate third-party developers to quickly develop MetaID-based development and is also a distributed data node.

ShowMANDB stores essentially the Tx collection of MetaID and provides external aggregation services.

ShowMANDB provides basic MetaID services. Applications can easily obtain the user’s MetaID user information, Protocols node information and other basic MetaID services through ShowMANDB. At the same time, we also provide basic Metanet request interfaces, including the acquisition of metanet tree, parent Nodes/child nodes, metanet node information, etc.

Applications can easily obtain data through ShowMANDB, and cooperate with MetaIDjs/ShowAppjs to complete the reading and writing of MetaID, which can focus on the application business and make it easier to produce better quality applications.

3. AppMANDB 和 LocalMANDB

First of all, AppMANDB and LocalMANDB are roughly the same in data storage and preset interfaces, and they differ in data filtering.

We noticed that just as ShowMANDB only filters and stores MetaID data in Metanet data, for most applications, you only need to focus on the data you are interested in, and storage and processing are completely sufficient. On the one hand, data storage will be reduced. , Operation efficiency will also become faster, so we separated AppMAN on the basis of ShowMANDB. After open source in the future, users will easily build AppMANDB and even process their own data on this basis.

Also for users, regardless of future point-to-point or offline processing needs, data can also be stored locally on the user's device, and new expansions in the future are also convenient. For example, we also integrate the lightweight LocalMANDB on ShowApp.

BSV-Data
ShowMANDB
ShowMANDB2
APPMANDB1
APPMANDB2
User1
LocalManDB1
User3
User4
User2
LocalManDB2
User6
User7
User8
User5
APPMANDB3

3.1 AppMANDB

AppMANDB can be configured to obtain data from ShowMANDB, and obtain data of interest from ShowMANDB through subscription mode. Applications can build APPMANDB that only contains their own data sets, subscribe to get their own tx collections from showmandb, and then perform data analysis and processing. You can expand the showmandb data interface to give your own applications more functions, and simultaneously obtain raw data from showmandb. , Showmandb service data.

Appmandb localmandb will provide the same basic interface services as showmandb, and also provide a data storage structure, so that the application/user can easily build their own additional data services based on the data. The interfaces provided include:

1.获取metaid基础信息getMetaIDInfo

2.获取节点信息getNode

3.获取MetaID节点parts信息

4.获取根节点

5.获取子节点

6.获取节点树

7.根据address获取节点

Wait.

For example, Showbuzz AppMANDB subscribes to the showbuzz protocol metanote protocol.

In this way, Showbuzz only needs to obtain data from showbuzz-AppMANDB. On the one hand, it reduces the load of the ShowMANDB service, and on the other hand, it will greatly accelerate the data acquisition speed. You can also add the functions you need on this basis, such as Tag data contest selection.

Insert picture description here

3.2 LocalMANDB

The application client (web or phone) further reduces the data and stores it in its own device, and the data acquisition and processing speed is further increased, providing a data basis for future point-to-point channels.

Such ChainData -> ShowMANDB -> AppMANDB -> localMANDB data layer distributed storage, not only in terms of ownership, users own their own data, but can also store data by themselves at a minimum cost. In fact, we are already in the product when designing this model At present, the prototype of localmandb has been initially completed in the Show APP. We also store basic information such as user information in metaidjs. In the future, the protocalsdata will also be stored to further optimize the user experience.

In this way, in the end, ShowMANDB owns all MetaID data, AppMANDB stores application-related data, LocalMANDB stores users' own data, and distributed data storage can ensure the normal operation of the business under big data. This design also allows the MetaID data of applications and users not to rely on any service provider alone, ensuring that the data is truly distributed and stored globally.

At present, ShowMANDB has provided services to the outside world and can be directly queried through API-query. LocalMANDB and AppMANDB have been tested in Show and other applications. Our development engineers are stepping up the optimization of these two programs to strive for open source as soon as possible.

Guess you like

Origin blog.csdn.net/percyWangcn/article/details/109292943