create account

RE: Additional endpoints for SteemPlus backend by justyy

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @stoodkev/additional-endpoints-for-steemplus-backend

· @justyy ·
$0.05
Thank you for your contribution. @steemsql  is not free anymore and thus we should be very careful in this as this potentially will make the API server a proxy between users and steemsql.  

However, as I understand this, it is useful to separate logics from the presentation, as you are using the APIs in Chrome extension, thus intelligent users may view-source and get the API directly.

On [here](https://github.com/stoodkev/steemplus-api/blob/master/routes/routes.js), line 86, you are missing a *(NOLOCK)* which might impose load to the steemsql server. And I am not sure this is the 'correct' way to get incoming delegation as you are making assumptions that the ID increases as the timestamp increases. You might want to look at alternative solution such as [here](https://stackoverflow.com/questions/43895890/sql-selecting-the-rows-with-max-timestamp-by-group?rq=1)


----------------------------------------------------------------------
Need help? Write a ticket on https://support.utopian.io.
Chat with us on [Discord](https://discord.gg/uTyJkNm).

**[[utopian-moderator]](https://utopian.io/moderators)**
👍  , , , ,
properties (23)
authorjustyy
permlinkre-stoodkev-additional-endpoints-for-steemplus-backend-20180423t143614370z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-04-23 14:36:18
last_update2018-04-23 14:36:18
depth1
children2
last_payout2018-04-30 14:36:18
cashout_time1969-12-31 23:59:59
total_payout_value0.046 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,116
author_reputation280,616,224,641,976
root_title"Additional endpoints for SteemPlus backend"
beneficiaries
0.
accountutopian.pay
weight1,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,691,110
net_rshares9,513,212,129
author_curate_reward""
vote details (5)
@arcange ·
Hey @justyy, thanks for your comment.

I have regular contacts with @stoodkev about his great SteemPlus Chrome add-on and its usage of SteemSQL. We already talked together about "proxy risk" of publicly exposing API and this something @stoodkev perfectly understand.

> you are missing a (NOLOCK) which might impose load to the steemsql server

As explained in [this post](https://steemit.com/steemsql/@arcange/steemsql-update-12-about-locks-and-performances), the NOLOCK hint is no more required.

> making assumptions that the ID increases as the timestamp increases.

This is partially correct. ID indeed increase over time as it is an autonumber column. Anyway, should I implement non-linear blocks processing to improve performances, this assumption would become false.
properties (22)
authorarcange
permlinkre-justyy-re-stoodkev-additional-endpoints-for-steemplus-backend-20180423t162005880z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["justyy","stoodkev"],"links":["https://steemit.com/steemsql/@arcange/steemsql-update-12-about-locks-and-performances"],"app":"steemit/0.1"}
created2018-04-23 16:20:06
last_update2018-04-23 16:20:06
depth2
children1
last_payout2018-04-30 16:20:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length774
author_reputation1,146,633,779,972,293
root_title"Additional endpoints for SteemPlus backend"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,707,822
net_rshares0
@stoodkev ·
Thanks for taking the time to help us improve these queries!
properties (22)
authorstoodkev
permlinkre-arcange-re-justyy-re-stoodkev-additional-endpoints-for-steemplus-backend-20180423t172139277z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-04-23 17:21:39
last_update2018-04-23 17:21:39
depth3
children0
last_payout2018-04-30 17:21:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length60
author_reputation190,283,772,273,558
root_title"Additional endpoints for SteemPlus backend"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id51,716,787
net_rshares0