Privex Launches Steem Blockchain Database Service

in #dev7 years ago

What is SBDS?

SBDS stands for Steem Blockchain Database Service. It allows importing data from the STEEM blockchain into a MySQL database for fast and easy querying of data.

thumbnail_thumbnail.png

thumbnail_What are sbds (1).png

We did not create SBDS. It is an open source project created by Steemit Inc. developers (@sneak @layz3r @recrypto) and is available at https://github.com/steemit/sbds

We run a PUBLIC SERVER, on high quality hardware for developers to use. SBDS requires fast SSDs, and over 400GB of space, making it moderately expensive to run for a small project.

Why should I use it?

thumbnail_RPC VS SBDS (1).png

As you can see, SBDS is much faster for querying large sets of data from the blockchain.

We recommend a hybrid approach to your application (as is done by Steemit Inc's Jussi system), take recent/realtime data from RPC via websockets, while querying older data via SBDS.

Server Specs

CPUIntel(R) Xeon(R) CPU E3-1270 v3
RAM32gb DDR3
DISKS2x480gb SSDs in RAID 0 (for epic speeds)
NETWORK1gbps
LOCATIONGermany

Want a similar server for yourself? Check out our website @ www.privex.io. We sell Dedicated and Virtual servers for STEEM, SBD, LTC, and BTC located in Germany and the USA (more regions coming soon).

Connection Details

UserPassHostPort
steemsteemsbds.privex.io3306

!!! DISCLAIMER !!!

SBDS is BETA SOFTWARE. This means that it is not stable, and may sometimes stop syncing, or provide bad data. Please do not rely on it for anything mission critical. We'll do our best to keep it online, however it has hung randomly several times over the past few days.

We've found certain queries such as querying witness blocks extremely slow, and some tasks such as calculating post rewards are currently not possible. We hope that the SBDS developers work to improve these kind-of issues and make SBDS more versatile.

Connect to SBDS

We use MariaDB, which is mostly compatible with MySQL clients and libraries. In some cases you may experience issues, if you do, please try to use a MariaDB compatible client.

$ mysql -u steem -psteem -h sbds.privex.io steem

Get the structure of a table

MariaDB [steem]> show create table sbds_tx_account_creates;

| Table                   | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| sbds_tx_account_creates | CREATE TABLE `sbds_tx_account_creates` (
  `block_num` int(11) NOT NULL,
  `transaction_num` smallint(6) NOT NULL,
  `operation_num` smallint(6) NOT NULL,
  `timestamp` datetime DEFAULT NULL,
  `fee` decimal(20,6) NOT NULL,
  `creator` varchar(50) NOT NULL,
  `new_account_name` varchar(50) DEFAULT NULL,
  `owner_key` varchar(80) NOT NULL,
  `active_key` varchar(80) NOT NULL,
  `posting_key` varchar(80) NOT NULL,
  `memo_key` varchar(250) NOT NULL,
  `json_metadata` text DEFAULT NULL,
  `operation_type` enum('account_create') NOT NULL,
  PRIMARY KEY (`block_num`,`transaction_num`,`operation_num`),
  KEY `ix_sbds_tx_account_creates_timestamp` (`timestamp`),
  KEY `ix_sbds_tx_account_creates_block_num` (`block_num`),
  KEY `ix_sbds_tx_account_creates_operation_type` (`operation_type`),
  KEY `ix_sbds_tx_account_creates_creator` (`creator`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

Example query (get all accounts created by AnonSteem after the account delegation changes in a recent HF)

MariaDB [steem]> select timestamp,new_account_name 
from sbds_tx_account_create_with_delegations 
where creator = 'anonsteem' and timestamp > '2017-11-01' limit 10;
+---------------------+------------------+
| timestamp           | new_account_name |
+---------------------+------------------+
| 2017-04-03 22:50:15 | anontest2343     |
| 2017-04-03 23:28:27 | anontest2350     |
| 2017-04-03 23:32:33 | anontest2351     |
| 2017-04-03 23:44:39 | anchovy          |
| 2017-04-03 23:44:45 | archdruid        |
| 2017-04-03 23:44:51 | paul.allen       |
| 2017-04-03 23:44:54 | freebornsociety  |
| 2017-04-04 03:23:42 | zhangyong        |
| 2017-04-04 03:23:51 | greenland        |
| 2017-04-04 05:04:33 | revregor         |
+---------------------+------------------+

Thanks for reading!

We hope to make more contributions to the Steem Community, along with smaller coins such as PeerPlays, GOLOS etc.

If you want to help us out, you can buy a server from https://www.privex.io - we accept STEEM, SBD, LTC, and BTC. Support your local STEEM businesses :)

Have any questions about our servers? Email us: sales [at] privex [dot] io, or message us on STEEMIT.CHAT and we'll be sure to help you out.

A big thank you to @timcliff who makes regular donations to help us keep our RPC server running (steemd.privex.io), to @malicered who designed the graphics for our post, and to @drakos who helped us to get SBDS working well.

Sort:  

Nice to see that companies are paying attention to Steem ecosystem and are willing to make it even better.
In most cases you don't have to parse entire chain to get data you want and can query RPC methods (https://github.com/steemit/steem-js/blob/master/src/api/methods.js) but it is still pretty slow (700-1000ms) and not very flexible.
SBDS is way faster (100ms at most) and you can do basically everything with it.
Looking forward to using it at Busy!
Keep up the great work!

Congratulations @privex, this post is the third most rewarded post (based on pending payouts) in the last 12 hours written by a User account holder (accounts that hold between 0.1 and 1.0 Mega Vests). The total number of posts by User account holders during this period was 2368 and the total pending payments to posts in this category was $2678.25. To see the full list of highest paid posts across all accounts categories, click here.

If you do not wish to receive these messages in future, please reply stop to this comment.

Good work.
I have local instances but IMHO it's still not ready to make it publicly available, but such pre-release as yours is still valuable as people would have time to get used to using it.
( @furion's node is no longer following a head block AFAIK )

Interesting post, Can anyone explain what the program can do for a noob?

i have been waiting for it! great, api is not very handy

Very helpfull post me and all user....hopefully i trust Your next post again better..thnx

Good work. Saved in the bookmarks to use it!! Very nice. Thanks

This post has received a 0.57 % upvote from @booster thanks to: @someguy123.

Wow! This is so cool.

wow, this is huge. i will absolutely be coming to use for a witness server next year.

Nice post..this is helpful

I have a problem to consult.
How to get the payout of each post?

Good job! I was waiting for mysql compatible service like years!

I noticed that the most recent transactions seems to be at 16th April.

Is that temporary, and the node is still being maintained, or is it proving too unreliable to keep up to date?

From what I heard sbds base simply sucks :( and gets desynced often, it is a huge problem for me to maintain my app because of that.

Thanks... I'm sticking with internal databases until SBDS and Hivemind are stable.

Is this server still working? Can't get a connect.
ERROR 2003 (HY000): Can't connect to MySQL server on 'sbds.privex.io' (110 "Connection timed out")

Hey guys I'm brand new to steemit and DTube and just uploaded my first cover!

please go check it out:

 7 years ago  Reveal Comment