最早在区块链中引入 DAG 概念作为共识算法是在 2013 年,bitcointalik.org 由 ID 为 avivz78 的以色列希伯来大学学者提出,也就是 GHOST 协议,作为比特币的交易处理能力扩容解决方案;Vitalik 在以太坊紫皮书描述的 POS共识协议 Casper,也是基于 GHOST POW 协议的 POS 变种。
后来 NXT 社区有人提出用 DAG 的拓扑结构来存储区块,解决区块链的效率问题。区块链只有一条单链,打包出块无法并发执行。如果改变区块的链式存储结构,变成 DAG 的网状拓扑可以并发写入。在区块打包时间不变的情况下,网络中可以并行打包 N 个区块,网络中的交易就可以容纳 N 倍。
此时 DAG 跟区块链的结合依旧停留在类似侧链的解决思路,交易打包可以并行在不同的分支链条进行,达到提升性能的目的。此时 DAG 还是有区块的概念。
2015年9月,Sergio Demian Lerner 发表了 《DagCoin: a cryptocurrency without blocks》一文,提出了 DAG-Chain 的概念,首次把 DAG 网络从区块打包这样粗粒度提升到了基于交易层面,但 DagCoin 本身是一篇论文,没有代码实现。
Components are the units of deployment. They are the smallest entities that can be deployed as part of a system. In Java, they are jar files. In Ruby, they are gem files. In .Net, they are DLLs. In compiled languages, they are aggregations of binary files. In interpreted languages, they are aggregations of source files. In all languages, they are the granule of deployment.
Components can be linked together into a single executable. Or they can be aggregated together into a single archive, such as a .war file. Or they can be independently deployed as separate dynamically loaded plugins, such as.jar or .dll or .exe files. Regardless of how they are eventually deployed, well-designed components always retain the ability to be independently deployable and, therefore, independently developable.
对于这个问题我们需要回归到计算机读写的核心上,计算机的读写速度是有限的,所以需要把数据缓存起来,来提高读写速度。为什么要使用缓存呢?从硬件角度我们知道计算机是有多级缓存架构的,每一级存储设备的读写速度是指数级下降的,越靠近终端存储设备(机械硬盘、固态硬盘)其读写速度越慢,越靠近 CPU 的存储设备其读写速度越快。