为什么Web3现在比以往任何时候都更需要实时数据层?

币圈资讯 阅读:45 2024-04-22 11:03:13 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

作者:Pieter Humphrey,DataStax 翻译:善欧巴,比特币买卖交易网

如今的区块链实施成本太高且速度太慢,无法作为通用的 Web3 计算平台运行。成功的系统正在使用实时的链下数据来寻找市场契合点。

如今,Web3 正处于一个棘手的境地,不仅仅是因为高调的不良行为者给区块链生态系统投下了过长的阴影。如果不放弃区块链最初吸引人的原则,就很难克服三个重大问题:

  1. 与 Web 2.0 的同类产品相比,链上存储和写入操作的成本高得令人望而却步。

  2. 为了确保基于区块链的系统所承诺的安全性,链上存储和写入操作非常慢(可以说是设计使然)。由于需要超过 51% 的节点就写入的新数据的有效性达成一致,随着节点添加到网络以及写入请求流量的增加,性能会进一步下降。

  3. 任何给定区块链账本的长度(大小)都会随着使用而显着增长,打破了当今市场上绝大多数数据库基础设施的限制。

操作数据库、分析数据库和分布式账本都是有效且不同类型的数据库管理系统。涌现的不同点对点区块链网络令人困惑的是,它们不仅仅是“数据库”,许多还是可用于托管(服务)互联网应用程序(或“dApps”)的“服务器” -去中心化应用程序)由任何有能力的开发人员编写。

大多数新技术都会经历一个使用过度普遍化的阶段,直到找到适合的产品或市场。这三个挑战的根源在于同样的“用正确的工具来做错误的工作”。例如,大多数 IT 专业人员不会将操作数据库用作分析数据库,反之亦然。使用分布式账本作为操作或分析数据库(例如,在部署到区块链网络的 dApp 下)是一种特别糟糕的搭配,原因将在下面进一步解释。

当然,区块链社区正在研究创新的方法来解决性能问题而不损害安全性,但这需要时间。以太坊最近在这方面采取了一些变化。可以说,信任必须放在某个地方。区块链将这种信任从传统的 Web 2.0 模型中转移出来,但并没有从根本上消除这种要求——至少在今天还没有。

链下实时数据为 Web3 寻找产品/市场契合度提供了直接途径。然而,这种方法以 dApp 的操作/分析数据的形式在 Web 2.0 系统中找到了信任。然而,市场上最成功的 dApp 和基于区块链的服务已经做出了这种权衡,使用正确的工具-正确的工作方法,利用每种技术发挥其最擅长的功能。

在更深入地探讨 Web3 如何以及为何能够利用实时数据取得进步之前,让我们先考虑一下 Web3 的未来前景,无论我们刚刚确定的这三重挑战如何。

什么将继续推动 Web3 向前发展?

在这样的时刻,重要的是要记住区块链≠加密货币。加密货币是区块链概念和基础技术构建块的应用。NFT 和更广泛的 Web3 概念也是如此。区块链的核心概念——交易、头寸和谁拥有什么的不可篡改的公共记录——与当前的金融体系有着持续而有趣的不同,在当前的金融体系中,此类账本驻留在私人数据库中,只能通过管理机构和监管机构的规则访问机构和法律。对于特定的用例来说,确实有现实世界的价值和意义。这些是什么?

据麦肯锡称, 2021 年最大的Web3 借贷平台发放了 2000 亿美元的贷款。贷款、存款、汇款、资产互换、贸易融资和保险已成为有效的用例。其他点对点、游戏、社交和在线媒体虽然起步较早,但表现出显着的活跃度。

数字身份服务以及供应链和物流管理仍然是一种明显的可能性。假设的元宇宙中的投机用例正在推动真正的投资美元,Facebook 等公司正在转向、更名为 Meta并全力以赴。

封闭和受保护网络上的私有区块链系统(例如Hyperledger Fabric)可能不是创建者所设想的,但现在可以为特定行业和机构提供更通用的用例(代价是成为一个向公众开放的 Web3 系统)民众)。NFT(不可替代代币),或者说,独特、不可分割和不可篡改的代币理念在以数字方式表示现实世界和仅限在线的临时资产方面具有真正的潜在商业价值。

这些都是安全的公众猜测使之成为可能的事情,但尚未解决。合法地(在某些情况下,物理上)建立现实世界与数字 NFT 的连接仍在进行大量探索。Web3 提供商 Alchemy 在本季度的报告中指出,智能合约部署量较 2021 年同季度增长了 143%。

尽管像任何新想法一样,还有一些重大问题需要克服,但投资资金、开发商和机构兴趣确实具有吸引力,可以吸引推动区块链向前发展的能量。随着核心技术的完善,将会创造更多的Web3价值。随着更多价值的产生,新的机会将会出现,从而激发人们对解决监管、法律、数据隐私以及更好的开发人员和最终用户体验的兴趣。

1dqX8LBYNumisJCg14W9oKttMGqzPB1NS80E1t0u.png

Web3 开发人员的链上数据注意事项

基于工作量证明的区块链产品面临的挑战延伸到了其底层架构中。操作数据库非常适合快速、高效的数据存储和检索。分析数据库非常适合快速、开放式查询和探索。非关系数据库大规模提供不同级别的操作或分析功能,而不牺牲性能和可用性。

基于区块链的系统提供了安全、不可变的账本,但以性能为代价。尝试使用安全的、仅附加的不可变账本作为操作、分析或非关系数据库将导致以下问题:

不可接受的表现

Web 2.0 技术堆栈设定了世界上大多数人对快速响应的数字体验的期望,无论您使用的是平板电脑、手机还是台式机/笔记本电脑,都不需要两分钟到六小时。大多数流行的区块链实现都基于缓慢的工作证明算法来保护对区块链数据存储的写入,并基于缓慢的点对点共识来确保跨节点网络读取的数据一致。

数据量导致生产中断

区块链不仅仅是一个“大数据”问题;它也是一个问题。这是巨大的、令人难以置信的数据,而且随着使用量的增加只会变得越来越大。很少有操作或分析数据库能够达到这个级别,甚至更少的数据库能够真正实现该级别的线性可扩展,从而大大缩小了选择范围。

相互矛盾且不准确的数据

区块链广泛的点对点、最终一致的设计和工作量证明性质使其安全,但会产生不一致的数据,使其无法作为 Web3 应用程序的操作或分析数据库。由于这些问题没有错误消息或故障代码,因此编写错误处理代码来测试、解释或解决这些错误以试图进行补偿是很耗时的,或者是不可能的。当然,生产中的调试或其他危急时刻的调试对于所有相关人员来说都是一场噩梦。下游技术支持将无法为愤怒的用户提供答案,开发人员也无法为技术支持人员提供答案。提示应用商店的负面评论。

不可接受的存储/使用成本

链上操作成本高昂:以太坊区块链上 1GB 的数据需要花费数千美元。

kkBwXVyQH1qUmeqDk1uoI97w0PPEybysQCL3jcFv.png

其他考虑因素

在链外索引或同步区块链数据并不简单,因为这些数据不是人类可读的。区块链数据需要通过第三方数据服务进行解码、丰富、重组和数据建模,然后才能被开发人员轻松使用。

解决方案:实时链下同步数据

流行的区块链网络实施需要时间来解决其设计中的性能问题。链下处理是成功的 IT 专业人员用来充分利用现有数据库技术和区块链的优势的主要技术,将每种技术用于其最佳设计目的。简单来说,dApp 应该从链外数据库读取数据,并将数据写回链(但仅记录交易最终结果所需的最低限度的详细信息)。

xQd5bTdPqcV93WXuuQ48MYCivYV5hlGukPg8wSfT.png

通过将区块链的状态实时同步到操作或分析数据库,您可以确保 dApp 快速运行的数据准确性/货币性。然后,当您的 dApp 和链下数据库完成尽可能多的预处理后,将最终结果提交回链。

静态和二进制资产可以使用 IPFS 等系统,但出于同样的原因,明智的做法是尽可能考虑链下对象存储(例如 S3)。因此,在实践中,具有始终同步的链状态克隆的链外数据库应该成为尽可能多的操作或分析工作负载的读/写目标。

但正如前面所讨论的,庞大的数据量(尤其是随着时间的推移)会破坏大多数数据基础设施。Apache Cassandra 是在这种容量、规模和性能水平上最强大的操作数据库系统之一。

借助正确的数据模型,应用程序可以体验到 Redis 等内存缓存以及持久数据库管理系统 (DBMS) 所期望的亚秒级速度。如果非关系数据服务可提供历史数据和始终最新(实时)的链下数据会怎样?

bRnwA3ODVceUk9cNS7DzaAgPaWuSFmyaSKfm8IUg.png

在索引过程中,原始数据会自动解码。对于开发人员来说,这改变了使用原始十六进制数据的区块链数据的体验,如下所示:

cmE4jaBwIYEOWCxSIYXWdfEMRdcuMxHv5LlFKxfT.png

对于人类可读的数据,如下所示:

8Ey1gCqlmFHN0t5bIcgsON2d6yDRxoJfhYH0eOok.png

然后,Web3 开发人员通常需要重新组织和丰富来自Etherscan、whatsabi 、NFT 元数据等第三方数据服务的链数据,以便对最简单的查询有用。如果随后将丰富的数据建模为可查询的数据库表,那么开发人员将拥有标准 DBMS 查询语言的全部功能(而不是必须学习区块链分析 API)。

让我们看一个例子:

开发者意图:从块组 134 中搜索五个条目

实际查询代码:

KqRxXGwl8Q9T0F8BKQry6xShrxuFlHNyd5zocviN.png

系统响应:

wREOSX1BA6h0MCkm5tuJ53dIUTYgszO22QJtg0Ob.png

那么,这在实践中是什么样的呢?为了让它变得栩栩如生,请看一下这两个(实时)示例应用程序,它们正是使用这样的脱链实时数据服务。Web3开发人员应该熟悉应用程序源代码;它是使用流行的 Web3.js 库编写的。

NFT探索者

  • 搜索在几秒钟内创建的每一个 NFT

  • 在单个 API 调用中提取 NFT 的传输历史记录

NFT Explorer 使用 React 和 Next JS 构建,为用户提供了以太坊区块链上支持的已实时铸造或传输的 NFT 的完整视图。

区块链浏览器

  • 按区块号拉动历史 Gas 价格

  • 按区块号拉取 ERC20 传输数量

与 NFT Explorer 一样,该区块链数据浏览器从链下数据中提取所有区块链数据,并为用户提供已开采的最新区块以及最新以太坊交易的实时视图。

在托管云服务上提供所有这些将有助于克服传统的反射,以实现关系 DBMS 式的易用性和上市时间。在 Cassandra 之上构建这样的服务还可以独特地提供将这些数据与您的 Web3 应用程序在任何区域或多区域中共置的能力,而无需分片。Cassandra 的内置复制已经在十多年来最极端的互联网规模生产环境中进行了战斗测试。

Web3 应用程序和开发人员的优势

通过最小化 dApp 大小、链上数据存储和链下处理的区块链写入,大多数用例的运营成本将重新调整到 Web 2.0 水平。用户在其选择的设备上的 dApp 性能恢复到可接受/预期的水平。然后,dApp 开发人员可以设计适当的“等待时间”对话框、屏幕和警告,以设置用户在需要向基于区块链的系统提交写入操作时的期望。

最大、最棘手的数据一致性问题已得到解决,因为 dApp 的大部分操作数据都存储在快速、可靠的链下数据库中。这不仅可以节省数小时的令人沮丧(并且可能毫无结果)的调试时间,而且可以避免可能无法解决的生产错误。

由于非关系数据库等链外系统可以处理大数据量,因此随着区块链的增长,您的 dApp 将满足正常运行时间和响应时间的预期,而无需在投入生产几个月后进行昂贵的系统重新设计或彻底重写。根据最新的Stack Overflow 开发者调查,与 Cassandra 一起工作——可以说是最可靠、最可扩展和最快速的非关系数据库——也是薪酬最高的工作之一。

对企业的好处

损坏、缓慢或不准确的应用程序会导致用户、收入和投资者信心的不可挽回的损失。但是,让我们来讨论一下我们都希望进行的对话——将区块链状态实时同步到链下、非关系型基础设施可能会带来哪些令人兴奋的事情?

  • 分析 dApp:将 dApp 与链下分析数据库集成,打开了整个“Web 2.0”选项和用例的前景。

  • 欺诈检测/预防功能:构建可以驱逐不良行为者或标记/阻止滥用的 dApp,从而保护您的用户社区和您的业务。

  • 数字资产交换的权威:NFT 交换需要准确/最新的市场数据,以促进最佳的交易/销售/交换。当用户在几分钟后看到自己以较低的价格购买的商品时,防止买家后悔,以及资源密集型的退款流程和负面的用户评论。

  • 基于位置的功能:了解当前位置是当今许多移动应用程序的基础。将其带到您的 dApp 中!

  • 物联网应用:来自软件或硬件的机器生成的数据的写入速度和容量只有非关系数据库才能毫不妥协地处理。

  • 数据主权:出于合规性、监管或法律原因,使用 dApp 找到区块链状态的同步副本(无论其部署在世界何处)。

区块链交易解析时间由协议决定,如果没有汽油/交易费或使用加速器服务就无法加快。通过尽可能多地在链外进行预处理,您可以最大限度地减少交易最终结果的大小和频率。这将降低任何用例的链写入成本并提高 dApp 速度。

亲自尝试作为服务

这种对实时数据的关注超越了区块链。这是该行业十多年来一直在创新的领域。但区块链等技术有助于表明实时数据成为数据架构和业务模型一部分的重要性。

当我们等待量子密码学作为一种服务、原子钟的普及和分布式共识算法的新创新时,实时数据现在可以通过 Web 2.0 成本结构获得。实时数据仍将是未来任何区块链实施的核心、基本要素。


The current blockchain implementation cost is too high and the speed is too slow to be used as a general computing platform. The successful system is using real-time offline data to find the market meeting point. Now it is in a difficult situation, not only because high-profile bad actors have cast a long shadow on the blockchain ecosystem, but it is difficult to overcome three major problems if we do not give up the principle that the blockchain is initially attractive. The cost of writing operation is prohibitively high. In order to ensure the security promised by the blockchain-based system, the storage and writing operations on the chain are very slow. It can be said that because the nodes that need to be exceeded agree on the validity of the new data written, with the addition of nodes to the network and the increase of writing request traffic, the performance will further decline, and the length and size of any given blockchain account book will increase significantly with the use, breaking the vast majority of database infrastructure in the market today. Restricting operation, database analysis, database and distributed ledger are effective, and different types of database management systems have emerged with different peer-to-peer blockchain networks. What is puzzling is that they are not only databases, but also can be used to host services, Internet applications or new servers. Decentralized applications are written by any capable developer, and most new technologies will go through a stage of over-generalization until they find a suitable product or market. The root causes of these three challenges are: Similarly, using the right tools to do the wrong work, for example, most professionals will not use the operation database as an analysis database, and vice versa. For example, using distributed account books as an operation or analysis database is a particularly bad collocation reason, which will be further explained below. Of course, the blockchain community is studying innovative methods to solve performance problems without compromising security, but it takes time. It can be believed that Ethereum has recently taken some changes in this regard. Blockchain, which must be put somewhere, has shifted this trust from the traditional model, but it has not fundamentally eliminated this requirement. At least today, there is no offline real-time data to provide a direct way to find the product market fit. However, this method has found trust in the system in the form of operational analysis data. However, the most successful and blockchain-based services in the market have made this trade-off, using the right tools, working methods and using each technology to play their best. Long Function Before discussing how and why real-time data can be used to make progress, let's consider the future prospects. No matter what the triple challenges we have just identified, what will continue to push forward. At this moment, it is important to remember that blockchain cryptocurrency cryptocurrency is the application and wider concept of blockchain concept and basic technology building blocks, as well as the core concept of blockchain, trading positions and who owns what cannot be tampered with public records. There is a continuous and interesting difference from the current financial system. In the current financial system, such books reside in private databases, and institutions and laws can only be accessed through the rules of management agencies and regulatory agencies. For specific use cases, these are indeed of real-world value and significance. According to McKinsey, the largest lending platform issued loans, loans, deposits, remittances, asset swaps, trade financing and insurance in. Although it started early, it shows remarkable activity. Digital identity services and supply chain and logistics management are still an obvious possibility. The speculative use cases in the hypothetical meta-universe are promoting real investment. Companies such as Dollar are turning to rename and go all out to private blockchain systems on closed and protected networks. For example, it may not be what the founders envisioned, but now it can provide more general use cases for specific industries and institutions at the cost of becoming a system open to the public. Substitution tokens or unique, indivisible and tamper-proof token concepts have real potential commercial value in digitally representing the real world and online-only temporary assets, which are all made possible by safe public speculation, but have not yet been solved. In some cases, the physical connection between the real world and numbers is still being explored. In this quarter's report, providers pointed out that the deployment of smart contracts has increased compared with the same quarter of last year, although like any new ideas. There are still some major problems to be overcome, but the interest of investment funds, developers and institutions is really attractive, which can attract the energy to promote the development of blockchain. With the improvement of core technologies, more value will be created, and new opportunities will emerge as more value is generated, thus stimulating people's interest in solving regulatory laws, data privacy and better experience for developers and end users. Precautions for developers' data on the chain are challenges faced by blockchain products based on workload proof. The operation database is very suitable for fast and efficient data storage and retrieval, and the analysis database is very suitable for fast and open query and exploration of non-relational databases. It provides different levels of operation or analysis functions on a large scale without sacrificing performance and availability. Blockchain-based systems provide secure and immutable books, but trying to use secure and additional immutable books as operation analysis or non-relational databases at the cost of performance will lead to the following unacceptable problems. The presentation technology stack sets the expectation of most people in the world for a fast-response digital experience. Whether you use a tablet, a mobile phone or a desktop laptop, it doesn't take two minutes to six hours. Most popular blockchain implementations are based on a slow proof-of-work algorithm to protect the writing of blockchain data storage, and based on a slow peer-to-peer consensus to ensure that the data read across the node network is consistent. Blockchain is not only a big data problem, it is also a big data problem. It is a problem, which is huge and incredible data, and it will only become bigger and bigger with the increase of usage. Few operation or analysis databases can reach this level, or even fewer databases can truly realize the linear scalability of this level, thus greatly narrowing the scope of choice. The contradictory and inaccurate data blockchain has a wide range of point-to-point design and workload proof properties, which makes it safe, but it will produce inconsistent data, which makes it impossible to be used as an application operation or analysis database. Because there are no error messages or fault codes for these problems, error handling codes are written to test. 比特币今日价格行情网_okx交易所app_永续合约_比特币怎么买卖交易_虚拟币交易所平台

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明 网址:https://netpsp.com/?id=61822

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

若遇到问题,加微信客服---清歌

搜索
排行榜
扫一扫,加我为微信好友加我为微信好友