Introducing ebakusDB (part 1)

in #steem5 years ago

In this article we are going to build a Leaderboard dApp on ebakus using Solidity and ebakusDB. To make it more digestable we have split it in 2 parts. This first part of the tutorial will showcase how to leverage ebakusDB within your smart contract allowing you to handle large datasets with ease and in part 2 we will see in detail how to access the data you stored there from any website or application.

A little about ebakusDB

ebakusDB is a transactional database we have built from scratch that we use as a core element of the ebakus node. As you can see in this benchmark results table, its really fast and in part is what enables the ebakus node to scale that well. It supports multiple indexes and schema defined tables and after serving us that well in the node we decided to also expose it to the EVM and make it available to Solidity for smart contract development. It really changes what is possible to do with Solidity. It makes it so much easier to handle large datasets and implement projects like exchanges and complex games. But enough on the sales pitch lets see how we can use it.

What we are building

We are building a smart contract capable of storing multiple leaderboards. Each leaderboard can store multiple player scores and have ascending or descending ordering. This leaderboard smart contract can be integrated or set up to accept calls from another smart contract that handles game logic for a game dApp. Alternatively, it could also be a part of a game that has its game logic in a non-decentralized context and just uses ebakus to store its leaderboard system.

The data structure

To implement the leaderboard system we need to create the following data structure:

Since Solidity in Ethereum does not provide a database this would have to be stored in state storage as Solidity mapping to structs, which would in turn result in high costs in terms of gas and several limitations as the dataset grows. Moreover performing queries on any struct field would be impossible. Ebakus with ebakusDB provides a game changer solution to these problems.

more about here(medium.com/ebakus/introducing-ebakusdb-part-1-7ebe5013c0d0)

You can learn more about ebakus just reach Ebakus at discord (https://discordapp.com/invite/S6WxAKS), telegram (https://t.me/ebakus) and twitter (https://twitter.com/EbakusNetwork).

General Information:

Homepage (https://www.ebakus.com/)
Whitepaper(https://www.ebakus.com/assets/ebakus_whitepaper.pdf)

Sort:  

Congratulations @djino! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made your First Comment
You distributed more than 10 upvotes. Your next target is to reach 50 upvotes.
You received more than 10 upvotes. Your next target is to reach 50 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Vote for @Steemitboard as a witness to get one more award and increased upvotes!