In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the method of Dapp architecture design". In the daily operation, I believe that many people have doubts about the method of Dapp architecture design. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "what is the method of Dapp architecture design?" Next, please follow the editor to study!
Dapp architecture design
This is the basis of all the work. After reading the original chain source code and using the original wallet, we are thinking about how to do the dapp of the original chain. It should be said that the blockchain application should be done. We have tried to do dapp with Taifang, Bitcoin and super ledger before. Let's first summarize the pain points of the blockchain dapp:
1) there is no way to guarantee the authenticity of the data before the link.
2) Tps is very low
3) the access cost is high, so you need to build your own nodes.
Dapp architecture scheme
I have now summarized two dapp architecture solutions based on the original chain: (if there is a new version or a better solution, welcome to communicate)
Dapp is definitely inseparable from complex business, so it is certain to use more intelligent contracts than the original chain. The following solutions support smart contracts.
1. Build block chain node
In fact, it is to build a node, and then directly call the interface provided by the node to complete the business content of the block chain, which integrates the wallet function than the source code of the original chain, and it is more convenient to build. A few sentences of code can be built, but this kind of business is not reasonable, because this kind of back-end integration is better than the original source wallet (hereinafter referred to as "pc wallet"). It is equivalent to hosting all the account information to dapp, which is actually a centralized official wallet, and all accounts are under official control, which will have a centralization problem and will eventually be doubted whether it is necessary to use this block chain.
Than the original chain has a set of user modules, users can use pc wallets, client wallets, mobile wallets, etc., their own user information can be backed up, all transaction information can be found in the blockchain browser. This scheme is only mainly to achieve the trading chain.
Ps: of course, it can still be flexible, that is, all the interfaces of PC wallet can be implemented in dapp once, and then combined with business, but the original source code will be constantly updated, and then update with its version, and then update its own application, obviously not practical.
Tell me about the pit inside:
1) account BTM problem. In this solution, a user with a wallet is bound to the bottom of each dapp account, which can show the address user's own recharge, recharge directly in dapp, complete task dispatch, and so on. However, it takes time to initialize the account with BTM, and the normal application of this experience has already shut down the user.
2) UTXO problem, the original chain is based on the utxo free output transaction model, when the transaction in which your UTXO participates is not sure to be used, but the user bound here in dapp cannot guarantee that he has enough UTXO, unless he is allowed to split it when transferring the money himself, otherwise it will be similar to single-threaded operation, which is relatively slow.
3) users cannot obtain their own private keys. In Biyuan chain, PC wallet is a set of private keys, which is derived from multiple accounts. This means that one wallet has one set of private keys, which cannot be given to users. This violates the problem of decentralization of the blockchain.
Generally speaking, this scheme simply ensures that the dapp transaction is linked up, but it is obviously insufficient in all aspects.
II. Plug-in wallet (Byone) solution
This solution is a new dapp solution launched this year than the original chain, there is a solution to the pain point of solution 1, this is also a solution that I advocate, now the intelligent contract function of the original chain is already very powerful, if you do complex dapp, it is better to use this way.
To put it simply, a plug-in wallet is developed based on chrome. After installing the plug-in, users can directly create an account and use the account transfer function, which has the transfer function of BTM and the backup function of the account. Is a relatively complete wallet, the biggest function of this wallet is to contain a wealth of developers api, which can support developers to achieve intelligent contract transactions.
Let's focus on the technical principle of this structure, as shown in the figure.
1) the Dapp front end is the front end page, and the plug-in wallet is based on chrome, so what is represented here is the api of the new page integrated with the plug-in wallet (Byone).
2) Byone can be found in the chrome App Store and click install. The current version is 2.0.0, which is very easy to use.
3) Bufferserver server, officially provided that this module in demo belongs to cache server. In fact, this module should be changed to Dapp backend. The actual business logic still needs back-end assistance, such as ranking, non-BTM asset trading and so on. (the latter part focuses on a chapter to make it clear.) now it can be understood as the back end.
4) Blockcenter, in fact, is an official service. The direct provision of APIs can trigger the transaction function of the original chain, which solves the above solution, avoids the need to build your own node nodes, and makes it easier for dapp developers to access.
At this point, the study on "what is the method of Dapp architecture design" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.