Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decompose get_state query into parallel subqueries #110

Closed
22 tasks
john-g-g opened this issue Mar 26, 2018 · 2 comments
Closed
22 tasks

decompose get_state query into parallel subqueries #110

john-g-g opened this issue Mar 26, 2018 · 2 comments

Comments

@john-g-g
Copy link
Contributor

john-g-g commented Mar 26, 2018

Supports

  • common state object properties
    • current_route
    • props
    • tag_idx
    • feed_price
    • error
  • /@<account>/transfers
  • /@<account>/recent-replies
  • /@<account>/posts
  • /@<account>/comments
  • /@<account>/
  • /@<account>/blog
  • /@<account>/feed
  • /@<account>/@<account_name>
  • /witnesses or /~witnesses
  • /trending
  • /payout
  • /payout_comments
  • /promoted
  • /responses
  • /hot
  • /votes
  • /cashout
  • /active
  • /created
  • /recent
  • /tags
{
  "current_route": <url>,
  "props": <get_dynamic_global_properties()>              // basic chain properties. a few keys are relevant
  "tag_idx": {
    "trending": <get_trending_tags().map(name)>           // simple array of trending tags used on homepage etc
  },
  "tags": <get_trending_tags()>,                          // only used for tag "explorer" page
  "content": {*url: post_object}                          // posts keyed by author/permlink
  "accounts": {*name: account_object}                     // relevant accounts keyed by name
  "pow_queue": [],                                        // unused/ignore
  "witnesses": <get_witnesses_by_vote()>,                 // only used for /~witnesses
  "discussion_idx": {....},                               // ordered post keys, keyed by (1) current tag (or ""), (2), active sort (e.g. created/trending)
  "witness_schedule": {<get_witness_schedule_object()>}   // unused/ignore
  "feed_price": {<get_current_median_history_price()>}    // referenced from: wallet, market, and signup_bonus(unused?)
  "error": ""
}
@roadscape
Copy link

Why are we doing this again? Hive handles most of this and get_state needs to be factored out of condenser ASAP anyway

@roadscape
Copy link

To recap chat -

Hive handles the posts/tags part of get_state using native data, allowing us to stop using tags and follows plugins for steemd. I’m guessing the SBDS implementation would be breaking up get_state into constituent subcalls. This is useful for the wallet/transfers case, but we’d need to forward the posts-related calls to hive, which already implements get_state (except the transfers case). Essentially.. hive and sbds/ah have mutually exclusive information which condenser expects merged. This needs to be addressed at the root (condenser) level or at the hive/sbds level.

Since the bulk of it is already implemented in hive, if we can remove ah reliance from get_state in condenser I don’t believe we need to build any more get_state compatibility layers.

Condenser issue tracking: steemit/condenser#2244, steemit/condenser#2684
Hive implementation: https://github.com/steemit/hivemind/blob/master/hive/server/condenser_api.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants