SteemMysql -- Yet another SBDS service

in #utopian-io7 years ago (edited)

SteemMysql

image.png

What is the project about?

SteemMysql is another service based on SBDS. SteemMysql gives you a way to get steemit data through mysql. This will make PHPers or other developers easier developing web services. As we all know, for now SBDS (Steem Blockchain Data Service) is PRERELEASE software, not yet suitable for production use. Proceed at your own risk.

Connecting Information

  • Server: mysql.steem-lightdb.com
  • Database: steem
  • Username: steemit
  • Password: steemit

Example to use

To get a user's post list

mysql> select block_num, title from sbds_tx_comments where author='ety001' and parent_author='' order by block_num desc\G
*************************** 1. row ***************************
block_num: 19434895
    title: To be a witness I need your vote! | ?????????????
*************************** 2. row ***************************
block_num: 19433990
    title: ?????????
*************************** 3. row ***************************
block_num: 19393271
    title: Another Mention Tool For Steem | ??Steem??????
*************************** 4. row ***************************
block_num: 19392688
    title: Another Mention Tool For Steem | ??Steem??????
*************************** 5. row ***************************
block_num: 19157997
    title: ?????????
*************************** 6. row ***************************
block_num: 19090402
    title: [????]????????????100??
*************************** 7. row ***************************
block_num: 18624558
    title: ??????????????
*************************** 8. row ***************************
block_num: 18468075
    title: 2017??????
*************************** 9. row ***************************
block_num: 18467471
    title: 2017??????
*************************** 10. row ***************************
block_num: 18072175
    title: Google ?????????
*************************** 11. row ***************************
block_num: 13970216
    title: Chang Island 's Seafood -- My first post
11 rows in set (0.41 sec)

Roadmap

Next, I will develop a lightDB service which stores only latest 30 days posts and comments.
According to my observation, most tiny apps or bot's scripts of steemit just need latest data. So storing all data is not a suitable way in most scenes. Making a lightDB also can reduce server resource using. Developers will no longer worry about server costs.

Any question?

If any question, feel free to submit a issue on the github issue.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it is not as informative as other contributions. See the Utopian Rules. Contributions need to be informative and descriptive in order to help readers and developers understand them.

Mysql service to the steem blockchain is a valuable service.

Yet this is too little code for a contribution, this sums it up:

$api_url = 'https://api.steemit.com';
$latest_block_num_command = '{"jsonrpc": "2.0", "method": "call", "params": ["database", "get_dynamic_global_properties", []], "id": 1}';
$result = json_decode(postData($api_url, $latest_block_num_command), true);
$latest_block_num = isset($result['result']['last_irreversible_block_num']) ?
                        $result['result']['last_irreversible_block_num'] :
                        null;
$db_block_num = DBBlockNum();
$lost_block_num = $latest_block_num - $db_block_num;

Please do take the time to develop your future contribution so that everybody wins.

You can contact us on Discord.
[utopian-moderator]

Hi, the index.php code is not the contribution. My contribution is that I provide a public server to run the SBDS service. But I have no idea which category to select on the Utopian.

Doesn't Utopian support this type of contribution?

Utopian is focussed around open source software, might it be development, suggestions, bug report, translation...

With good effort you might be able to craft either a blog or a tutorial on your new service. Just go over the rules before and think of the open source angle.

Be generous with your essay and you will be rewarded.

Thank you for your reply. I have changed this post's category to Blog Post.

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58044.48
ETH 2352.63
USDT 1.00
SBD 2.36