So, I've missed the last couple of days due to being stuck at work for consecutive twelve hour days, but given that I'm relatively free I thought I would share an idea I came up with while in the shower and refined during my breaks during work. Pardon not adding any new code today, I'm kind of burnt out on that end for today. So, let's setup the issue we're going to tackle today: When we're getting content for users to pick from, we are doing a lot of querying from the blockchain. Some of this querying is justified. But what if we query from the same starting point a second time a short time after the first? Well it is likely nothing has changed. So we waste a lot of time querying, especially if areas of the Steem topology are traversed very frequently in a short period of time. Querying also takes a lot of time and some of the relationships do a lot of queries. So any solution needs to reduce the number of queries while also maintaining the fidelity of the product. What's the solution for this problem? Developing a cache for the entire network and updating the cache when updates are made. Here's how it works: We store nodes of the relevant network in our database. The relevant nodes in our case is a point where the relationships branch off of. In our case, a node would be a specific account since all relationships derive some information given a account. So, we would store seven things (given our current application): 1. Account Name (This acts as a Node identifier / reference ) 2. Content derived from relationship 1 3. Content derived from relationship 2 4. Content derived from relationship 3 5. Content derived from relationship 4 6. Content derived from relationship 5 7. Timestamp of last operation The first six are pretty obvious why we store them. We store the account name so if we search the same account in the future by anybody, we can simply give them the content rather than querying the blockchain a lot. The reason we need the timestamp is to perform a single check on the blockchain. If the author has performed an operation, then our information may be outdated and we should re-query the chain. If no operation has been performed, then we simply store the information in our network cache. In heavily traversed paths, this prevents us from spamming the blockchain and overloading the server on the web application end. The cache also saves the end user tons of time and makes the overall experience more enjoyable while providing the same content they would receive otherwise. And that's an ideal solution. One with tons of benefits with no downside. So we'll implement something like this in the future before launching the app. But for now, we'll probably shift our focus to developing a good entry portal into our traversal mechanism and developing a few backup relationships, so users have plenty of options to select from. Have a great night everyone!
author | qfilter |
---|---|
permlink | greenshift-037-developing-a-network-cache |
category | greenshift |
json_metadata | {"tags":["greenshift","blog","development","brainstorm","programming"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-08-31 02:20:12 |
last_update | 2018-08-31 02:20:12 |
depth | 0 |
children | 5 |
last_payout | 2018-09-07 02:20:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.029 HBD |
curator_payout_value | 0.001 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,911 |
author_reputation | 391,282,423,676 |
root_title | "Greenshift 037: Developing A Network Cache" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 69,849,936 |
net_rshares | 22,031,527,051 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
carn | 0 | 1,392,997,033 | 100% | ||
edicted | 0 | 17,813,504,200 | 21% | ||
jacekw.dev | 0 | 1,848,914,674 | 100% | ||
ilovecoding | 0 | 553,409,479 | 5% | ||
teknomunk | 0 | 422,701,665 | 100% |
Just wanna let you know, even though I'm not a good commenter, I am following this to see how it goes. Also mentioned it in the brainstorming channel of the SteemPeak Discord channel ;) Good luck!
author | carn |
---|---|
permlink | re-qfilter-greenshift-037-developing-a-network-cache-20180831t045249488z |
category | greenshift |
json_metadata | {"tags":["greenshift"],"community":"steempeak","app":"steempeak"} |
created | 2018-08-31 04:52:51 |
last_update | 2018-08-31 04:52:51 |
depth | 1 |
children | 0 |
last_payout | 2018-09-07 04:52:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 197 |
author_reputation | 849,541,941,985 |
root_title | "Greenshift 037: Developing A Network Cache" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 69,858,999 |
net_rshares | 11,813,088,022 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
greer184 | 0 | 11,813,088,022 | 50% |
Hello! Your post has been resteemed and upvoted by @ilovecoding because **we love coding**! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On! 
author | ilovecoding |
---|---|
permlink | 20180831t022027419z |
category | greenshift |
json_metadata | {"tags":["ilovecoding"],"app":"ilovecoding"} |
created | 2018-08-31 02:20:27 |
last_update | 2018-08-31 02:20:27 |
depth | 1 |
children | 0 |
last_payout | 2018-09-07 02:20:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 276 |
author_reputation | 40,845,997,808 |
root_title | "Greenshift 037: Developing A Network Cache" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 69,849,954 |
net_rshares | 553,409,479 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ilovecoding | 0 | 553,409,479 | 5% |
Congratulations @qfilter! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@qfilter/birthday1.png</td><td>1 Year on Steemit</td></tr></table> <sub>_[Click here to view your Board of Honor](https://steemitboard.com/@qfilter)_</sub> **Do not miss the last post from @steemitboard:** <table><tr><td><a href="https://steemit.com/steemitboard/@steemitboard/5jrq2c-steemitboard-saint-nicholas-day"><img src="https://steemitimages.com/64x128/http://i.cubeupload.com/mGo2Zd.png"></a></td><td><a href="https://steemit.com/steemitboard/@steemitboard/5jrq2c-steemitboard-saint-nicholas-day">Saint Nicholas challenge for good boys and girls</a></td></tr></table> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
author | steemitboard |
---|---|
permlink | steemitboard-notify-qfilter-20181207t231250000z |
category | greenshift |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2018-12-07 23:12:51 |
last_update | 2018-12-07 23:12:51 |
depth | 1 |
children | 0 |
last_payout | 2018-12-14 23:12:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 920 |
author_reputation | 38,975,615,169,260 |
root_title | "Greenshift 037: Developing A Network Cache" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 76,519,714 |
net_rshares | 0 |
Congratulations @qfilter! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@qfilter/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@qfilter) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=qfilter)_</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
author | steemitboard |
---|---|
permlink | steemitboard-notify-qfilter-20191207t230826000z |
category | greenshift |
json_metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
created | 2019-12-07 23:08:27 |
last_update | 2019-12-07 23:08:27 |
depth | 1 |
children | 0 |
last_payout | 2019-12-14 23:08:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 616 |
author_reputation | 38,975,615,169,260 |
root_title | "Greenshift 037: Developing A Network Cache" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 93,206,822 |
net_rshares | 0 |
This post has been just added as new item to _[timeline of Q-Filter on Steem Projects](https://steemprojects.com/projects/p/q-filter/?utm_source=comment_timeline&utm_medium=steem&utm_campaign=new_event&utm_content=c1)_. If you want to be notified about new updates from this project, register on Steem Projects and add Q-Filter to your favorite projects.
author | steemprojects |
---|---|
permlink | re-greenshift-037-developing-a-network-cache-20180831t025456 |
category | greenshift |
json_metadata | "" |
created | 2018-08-31 02:54:57 |
last_update | 2018-08-31 02:54:57 |
depth | 1 |
children | 0 |
last_payout | 2018-09-07 02:54:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 357 |
author_reputation | 29,054,729,340 |
root_title | "Greenshift 037: Developing A Network Cache" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 69,851,943 |
net_rshares | 0 |