create account

Microservice idea by imwatsi

View this thread on: hive.blogpeakd.comecency.com
· @imwatsi ·
$9.17
Microservice idea
During development of Native Ads, I realized that a lot of dApps might need to have access to block data, but might not necessarily be in a position to write code for block streaming from scratch.

So I have decided to share the block streaming aspect of Native Ads, as a standalone microservice in two forms:

- a **module** that dApps can install as part of their backend to retrieve customizable data sets from blocks (e.g. custom_json ops for their apps only)
- a **public node**, that dApps can interact with and set parameters on the kind of data they want to keep track of

As a microservice, it will have more features and customizations to cater to a wide range of use cases.

One use case for a **public node** would be a simple app for example, that uses a few custom_json ops to provide data input for its users. It can simply subscribe to those few custom_json ops without having to write code for block streaming and parsing and without running a node connected to the blockchain.

One advantage of using the **module** implementation is that if your're making a dApp, you just host the module as part of your backend and have access to it via a local API, much like you would the PostgreSQL service. So you will have streams of block data available to you, while the module handles all the streaming and parsing logic.

*I think it will lower the barrier to entry for new dApps.*

What are your thoughts on this kind of microservice?
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 56 others
properties (23)
authorimwatsi
permlinkmicroservice-idea
categoryhive-139531
json_metadata{"tags":["hive","idea","development","microservice"],"app":"hiveblog/0.1","format":"markdown"}
created2020-10-09 19:45:00
last_update2020-10-09 19:45:00
depth0
children10
last_payout2020-10-16 19:45:00
cashout_time1969-12-31 23:59:59
total_payout_value4.742 HBD
curator_payout_value4.430 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,448
author_reputation131,386,362,730,495
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,037,439
net_rshares34,502,283,077,501
author_curate_reward""
vote details (120)
@elikast ·
@tipu curate 
properties (22)
authorelikast
permlinkre-imwatsi-2020109t214844295z
categoryhive-139531
json_metadata{"tags":["hive","idea","development","microservice"],"app":"ecency/3.0.4-mobile","format":"markdown+html"}
created2020-10-09 19:48:42
last_update2020-10-09 19:48:42
depth1
children1
last_payout2020-10-16 19:48:42
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_length13
author_reputation94,178,068,217,451
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,037,481
net_rshares0
@tipu ·
<a href="https://tipu.online/hive_curator?elikast" target="_blank">Upvoted  &#128076;</a> (Mana: 18/27) <a href="https://peakd.com/hive/@reward.app/reward-app-quick-guide-updated" target="_blank">Liquid rewards</a>.
properties (22)
authortipu
permlinkre-re-imwatsi-2020109t214844295z-20201009t194901
categoryhive-139531
json_metadata""
created2020-10-09 19:49:03
last_update2020-10-09 19:49:03
depth2
children0
last_payout2020-10-16 19:49:03
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_length215
author_reputation55,949,689,035,458
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,037,488
net_rshares0
@emrebeyler ·
might be helpful

https://github.com/inertia186/meeseeker
properties (22)
authoremrebeyler
permlinkre-imwatsi-qhzcqp
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.09.5"}
created2020-10-10 09:52:03
last_update2020-10-10 09:52:03
depth1
children1
last_payout2020-10-17 09:52:03
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_length58
author_reputation448,535,049,068,622
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,044,757
net_rshares0
@imwatsi ·
Thanks, I'll check it out
properties (22)
authorimwatsi
permlinkqhzncr
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-10-10 13:41:15
last_update2020-10-10 13:41:15
depth2
children0
last_payout2020-10-17 13:41:15
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_length25
author_reputation131,386,362,730,495
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,047,229
net_rshares0
@hivebuzz ·
Congratulations @imwatsi! You received a personal badge!

<table><tr><td>https://images.hive.blog/70x70/http://hivebuzz.me/badges/birthday-4.png</td><td>Happy Hive Birthday! You are on the Hive blockchain for 4 years!</td></tr></table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@imwatsi) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
👍  
properties (23)
authorhivebuzz
permlinkhivebuzz-notify-imwatsi-20201011t222307000z
categoryhive-139531
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2020-10-11 22:23:06
last_update2020-10-11 22:23:06
depth1
children0
last_payout2020-10-18 22:23: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_length398
author_reputation369,663,591,473,293
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,068,388
net_rshares1,034,548,933
author_curate_reward""
vote details (1)
@marki99 ·
> a public node, that dApps can interact with and set parameters on the kind of data they want to keep track of

How can parameters be set to do that without actual programming required? Also, if an app is broadcasting custom_jsons, would it be too hard to filter them out?

There are many things I still don't understand so maybe I am missing something. 
properties (22)
authormarki99
permlinkre-imwatsi-qhz4sc
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.09.5"}
created2020-10-10 07:00:12
last_update2020-10-10 07:00:12
depth1
children1
last_payout2020-10-17 07:00:12
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_length355
author_reputation11,400,723,818,181
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,043,313
net_rshares0
@imwatsi ·
Currently, to get custom_json ops, you have to query the blockchain directly, by querying the hived nodes, on a per-block basis.

So to get a livestream of custom_json ops as they are being created you'd have to listen to every block that's being produced and filter out the custom_json ops you're interested, from all the other post and voting data.

So what I'm proposing is a public node, that one can get these ops from without querying for complete blocks. And an alternative module to install, that you can run locally and configure to store/retrieve only the custom_json ops you're interested in.

> How can parameters be set to do that without actual programming required?

The programming required would be less, because you won't have to write code to retrieve all the data sets you want, but just a few lines and API calls. The node will do most of the work behind-the-scenes.
👍  
properties (23)
authorimwatsi
permlinkqhznst
categoryhive-139531
json_metadata{"app":"hiveblog/0.1"}
created2020-10-10 13:50:57
last_update2020-10-10 13:50:57
depth2
children0
last_payout2020-10-17 13:50:57
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_length887
author_reputation131,386,362,730,495
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,047,354
net_rshares6,865,403,898
author_curate_reward""
vote details (1)
@simplegame ·
$0.02
I think this will be very helpful.

A lot of devs are scared off on trying to stream and parse the blockchain.

Making this a local API will speed up development.

👍  
properties (23)
authorsimplegame
permlinkre-imwatsi-qhyh6t
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.09.5"}
created2020-10-09 22:30:30
last_update2020-10-09 22:30:30
depth1
children0
last_payout2020-10-16 22:30:30
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.012 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length164
author_reputation134,726,886,324,158
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,039,350
net_rshares164,687,279,944
author_curate_reward""
vote details (1)
@therealwolf · (edited)
$0.65
One thing that Hive needs better support for is custom_json specific queries. The only way to get a custom_json is by the transaction_id, but what if I want to access them based on a field inside the custom_json or based on the id? You could index them all yourself (i.e. https://github.com/emre/hotdog), but IMO this creates the problem of centralizing this data (if your storage gets hacked, the data is invalid)

For example, even if I host a hived and hivemind node, I still can access other nodes for the same data and in case of important data, I could even access multiple at the same time and choose the data which is consistent across the majority.

So, if we could create a public node specifically for custom_jsons querying, that people could run similarly to hived and hivemind node, that would be amazing.

Since @embrebeyler worked on this problem sort of, maybe you two can work together on it. Would be much appreciated, and even something I would def. vote for via DHF.

---

Edit: This could also be useful https://github.com/inertia186/meeseeker
👍  , ,
properties (23)
authortherealwolf
permlinkre-imwatsi-qhz92y
categoryhive-139531
json_metadata{"tags":["hive-139531"],"app":"peakd/2020.09.5"}
created2020-10-10 08:33:00
last_update2020-10-10 10:22:24
depth1
children1
last_payout2020-10-17 08:33:00
cashout_time1969-12-31 23:59:59
total_payout_value0.326 HBD
curator_payout_value0.326 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,064
author_reputation582,208,885,469,814
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,044,126
net_rshares3,323,079,978,546
author_curate_reward""
vote details (3)
@imwatsi ·
You point out some very good issues, that I hope a public node like this will solve. We could have the node index historical ops and since it's JSON, we could leverage PostgreSQL's in-built support for JSON data types to do queries key-value. I'll investigate the options.

I'll also get in touch with @emrebeyler.
properties (22)
authorimwatsi
permlinkqhznbe
categoryhive-139531
json_metadata{"users":["emrebeyler"],"app":"hiveblog/0.1"}
created2020-10-10 13:40:27
last_update2020-10-10 13:40:27
depth2
children0
last_payout2020-10-17 13:40:27
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_length314
author_reputation131,386,362,730,495
root_title"Microservice idea"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id100,047,225
net_rshares0