Block.one’s third EOSIO webinar is over. Many of you may have already watched it. The topic is “Build a Full-stack Web Application Using EOSIO”. There are three main types of blockchain applications: Web application, IoT application and Cloud application. Our amazing speaker Luis Paris who is a Developer Relations Advocate at Block.one showed us how various EOSIO components interact using a sample web application. This webinar covered 5 parts which are Nodeos architecture, RPC API, EOSJS, Reading Blockchain State and Sending Transactions. As usual, I will select some parts that I am interested in to share with you. If you missed it, you can always watch the webinar recording to catch up. So let’s get it started.
Different fields have different requirements for blockchain. Some require more security and others may focus more on efficiency. Let’s talk about different types of blockchain first.
According to the degree of openness to nodes, blockchains are currently divided into public chain, union chain and private chain.
(1)Public chain: A public chain is open to anyone. Everybody can read and send transactions and transactions can be validly confirmed. Users can join or leave the network at any time without obtaining authorization. Everyone can participate in the blockchain and download the complete blockchain data. Data is recorded by everyone fairly and openly. All the data can not be tampered with. The decentralization nature is the strongest.
(2)Private chain: A private chain is like a private ledger that belongs to an individual or company. And it is only available to individuals within the business. Developers don’t want everyone to be able to participate in the system. So they create a private blockchain which is not open to the public. Only permitted nodes can participate and view all the data. The private blockchain is suitable for the internal data management and auditing of a particular organization.
(3)Union chain: There are limits to the degree of openness and decentralization of union chains. Union chain is like a coalition of multiple companies that use a common ledger internally. Several organizations or institutions participate in a managed blockchain and are authorized to join or leave the network. Each organization controls one or more nodes that collectively record transaction data. Only those organizations are able to read, write and send transactions. The data is maintained jointly by the internal members of the union.
Luis also introduced Transaction Lifecycle. So as we can see in his PPT, there are 6 steps totally. Firstly someone create and send a transaction requirement via a wallet. All the nodes receive the transaction. Nodes in the network validate the transaction. Validated transactions are stored into a block. So block is created with many transactions. Nodes confirm this block. Finally it becomes a part of the blockchain. Now transaction is complete and can not be modified.
EOS Virtual Machine:
The full name of VM is Virtual Machine. Put it in blockchain background, we can see blockchain as operating system and VM as browsers. So smart contracts are rules running in VM. And DAPPs are like websites.
For now, to develop a complete and mature virtual machine system for blockchain means a large project and costs to developers and the community. The best way is to develop VM based on an existing mature virtual machine standards. Most blockchain projects have chosen to use existing mature VM like WebAssembly virtual machine. In last “Learning EOSIO with Lena”, I gave a brief introduction about EOSIO.CDT. It is a WebAssembly compilation toolchain based on the WASM platform. EOSIO.CDT is EOSIO’s independent and fully functional toolset for smart contracts.
EOS VM is a high-performance Blockchain WebAssembly Interpreter. So it is very helpful for developers to debug, compile, and optimize smart contracts. If you follow the news about EOSIO, you might have already known that EOSIO with EOS VM can now process smart contracts 12x faster than when EOSIO 1.0 released.
Then Luis talked about EOSJS. In order to make it easier to understand what is EOSJS, we can see it as a library which can make us easily use JavaScript to develop EOS blockchain. If you have already tried to build on EOSIO, you may know it is actually a really handy EOS HTTP API. You can search on internet about how to install EOSJS and connect to EOS.
According to the deployment mechanism, there are mainnet and testnet. Mainnet is trusted and recognized by blockchain community. Valid blocks are added to the mainnet’s block ledger. Testnet is only used for testing in order to try out our new ideas without damaging the main chain. And the test tokens have no trading value. There is a detailed tutorial in Block.one’s developer portal for users who intend to use the EOSIO testnet as testing environment for developing smart contracts and building blockchain applications on EOSIO.
During this webinar, Luis led a very nice demo about a chat web application on testnet. Users can post and reply messages to each other. And all the chat messages were recorded by IDs. It is actually really interesting to see how a chat web application works even without any experience of coding. Luis patiently went through the whole process in detail. You can always watch Luis’s webinar recording and try it by yourself.
That’s all for today’s learning. If you want to go deeper, you can definitely learn more things in detail with Luis’s guidance. As usual, there is also a Q&A part at the end of the webinar. Don’t miss this amazing webinar, you can always watch it in full. See you next time.
Lena Wang is an EOS Nation intern that has been with us for over 2 years. In 2015, Lena began her university study in the faculty of computer science of Sichuan University. She is currently studying for her master’s degree with a full scholarship at Sichuan University, located in Chengdu, China. She has a strong interest in blockchain and she’s honored to be a part of EOS Nation and make some contributions by writing and translating articles about EOSIO.