create account

Coding of Podping: what do you want to build with it? by brianoflondon

View this thread on: hive.blogpeakd.comecency.com
· @brianoflondon ·
$49.74
Coding of Podping: what do you want to build with it?
I've been drumming up support for my @podping [Proposal](https://peakd.com/me/proposals/181) and I thought it would be good to write up how it actually works in Python right now.

## Hive-Watcher - Watching the Hive chain

This project springs from pretty much the simplest code in the entire Python Dev library from Hive.

[PY: Stream Blockchain Transactions](https://developers.hive.io/tutorials-python/stream_blockchain_transactions.html)

The idea of watching the chain for specific custom_json's turned into this, [simple-watcher.py](https://github.com/Podcastindex-org/podping.cloud/blob/208616881f51a8cda36bc84cc58c97b042f17440/hive-watcher/simple-watcher.py):

![image.png](https://files.peakd.com/file/peakd-hive/brianoflondon/23swdsD8YEmuZpsUdamiZEXXFq1nYnxH1ciFDbitMYyVTVaHTXVkcN5GRG1M8d5aq9fmv.png)

We're only looking for operations with an id in this list (and "hive-hydra" will be dropped, it was only for early testing):

```
["podping", "hive-hydra"]
```

That's it, that's the code which, when run on a Raspberry Pi or a $5 Linode server, can replace heavy duty servers set up to hit hundreds of thousands of RSS feeds as fast as they can just to see if something has changed.

With those lines of code, a tiny machine can watch the Hive stream and then fire off a request to any RSS feed they know has been changed because the publisher tells them.

There is a [more sophisticated Hive-Watcher program](https://github.com/Podcastindex-org/podping.cloud/blob/12bc38e124d3ecaa46c25d03a6cb8ce336d13c6a/hive-watcher/hive-watcher.py) which contains a full command line interface, code to replay the chain and other more sophisticated operations but at its core it's the same as the simple-watcher.

The final part that should be noted is that at present there is a list of Hive accounts which are "approved" for sending podpings. That list is just the list of accounts followed by the @podping account so it is public and can be seen here:

https://peakd.com/@podping/following

There is a proposal in the works for removing this step and replacing it with a method by which an RSS feed itself signifies which Hive account is the allowed sender but that's a work in progress.

## Hive-Writer - putting Podpings on the Hive chain

The other side of the system is almost as simple. We just have to take in a URL (or a continuous stream of URLs) each one representing an RSS feed that has updated.

The idea is that a hosting company can fire off one of these notifications every time a feed is updated by a customer of that host. Today @podcastindex is acting as an intermediary and running an API server which just receives a single GET request with an authentication header. In the future, hosts will have their own Hive account and write directly to the chain.

The [hive-writer code is on Github](https://github.com/Podcastindex-org/podping-hivewriter/blob/4c0f3411b944fc19b3c82290e1138625bff52fb6/hive-writer.py) and work is underway to create a Docker image (look in the Development branch).

Whilst the writer code is a little more complicated because of a ZMQ socket and some queuing systems, the heart of it from a Hive point of view is this:

![image.png](https://files.peakd.com/file/peakd-hive/brianoflondon/23swe1V7PMTCB5AvbkLKqXGcoVmBmtu6EmivEXZQkodFQcdyxdjMzhwDd1w5BcKhq9EvV.png)

And just with that perhaps we've created a new protocol for the internet? I'm not quite sure what gets to call itself a protocol, but this use of a blockchain seems to fit the bill for something nobody's ever put in place before. Right now it is signaling updated podcast episodes. It will extend pretty soon to "going live" notifications.

[Podping on Hive may well form the basis of an entirely new form of blockchain based Internet Protocol: this is what I'm hoping it becomes!](https://peakd.com/c-c-c/@brianoflondon/answering-questions-about-podping-on-hive)

---
Support this as [proposal 181 on PeakD](https://peakd.com/me/proposals/181)
[Support proposal 181 on Hivesigner](https://hivesigner.com/sign/update-proposal-votes?proposal_ids=%5B181%5D&approve=true)
---



----

![brianoflondon hive footer.png](https://files.peakd.com/file/peakd-hive/brianoflondon/fIN9elzs-brianoflondon20hive20footer.png)

- [Vote for APSHamilton's Witness KeyChain or HiveSigner](https://vote.hive.uno/@apshamilton)
- [Vote for APSHamilton's Witness direct with HiveSigner](https://hivesigner.com/sign/account-witness-vote?witness=apshamilton&approve=1)
- [Get Brave](https://brave.com/bri740)
- [Use my referral link for crypto.com](https://platinum.crypto.com/r/wkva2kezch) to sign up and we both get $25 USD
- [Sign up for BlockFi](https://blockfi.com/?ref=96f858b3)
- [Find my videos on 3speak](https://3speak.online/user/brianoflondon)
- [Join the JPBLiberty Class Action law suit](https://jpbliberty.formstack.com/forms/class_member_signup?Referral=brianoflondon)
- [Verify my ID and Send me a direct message on Keybase](https://keybase.io/brianoflondon)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 213 others
properties (23)
authorbrianoflondon
permlinkcoding-of-podping-what-do-you-want-to-build-with-it
categoryhive-169321
json_metadata{"app":"peakd/2021.05.5","format":"markdown","tags":["development","python","podping","leofinance","palnet","proofofbrain","stemgeeks"],"users":["podping","podcastindex","brianoflondon","apshamilton"],"image":["https://files.peakd.com/file/peakd-hive/brianoflondon/23swdsD8YEmuZpsUdamiZEXXFq1nYnxH1ciFDbitMYyVTVaHTXVkcN5GRG1M8d5aq9fmv.png","https://files.peakd.com/file/peakd-hive/brianoflondon/23swe1V7PMTCB5AvbkLKqXGcoVmBmtu6EmivEXZQkodFQcdyxdjMzhwDd1w5BcKhq9EvV.png","https://files.peakd.com/file/peakd-hive/brianoflondon/fIN9elzs-brianoflondon20hive20footer.png"]}
created2021-06-06 09:08:27
last_update2021-06-06 09:08:27
depth0
children4
last_payout2021-06-13 09:08:27
cashout_time1969-12-31 23:59:59
total_payout_value25.122 HBD
curator_payout_value24.616 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,958
author_reputation760,188,324,097,883
root_title"Coding of Podping: what do you want to build with it?"
beneficiaries
0.
accounthive-169321
weight200
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,162,556
net_rshares76,695,518,727,884
author_curate_reward""
vote details (277)
@inertia ·
May I suggest for line 57:

```python
data = json.load(post.get("json"))
```

Perhaps you should have some exception handling just in case the json parser doesn't find json.  Or if it indeed finds json, it contains an object and not an array.
👍  , , ,
properties (23)
authorinertia
permlinkre-brianoflondon-quaxsx
categoryhive-169321
json_metadata{"tags":["hive-169321"],"app":"peakd/2021.05.5"}
created2021-06-06 22:43:48
last_update2021-06-06 22:43:48
depth1
children1
last_payout2021-06-13 22:43:48
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_length242
author_reputation346,568,901,399,561
root_title"Coding of Podping: what do you want to build with it?"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,174,896
net_rshares6,376,500,072
author_curate_reward""
vote details (4)
@brianoflondon ·
You're absolutely right especially before we expand this to allowing anyone to write the pings to the network. It's on the list to make this thing much safer in terms of validation.
properties (22)
authorbrianoflondon
permlinkre-inertia-qubi4d
categoryhive-169321
json_metadata{"tags":["hive-169321"],"app":"peakd/2021.05.5"}
created2021-06-07 06:02:39
last_update2021-06-07 06:02:39
depth2
children0
last_payout2021-06-14 06:02: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_length181
author_reputation760,188,324,097,883
root_title"Coding of Podping: what do you want to build with it?"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,181,057
net_rshares0
@taskmaster4450le ·
$0.24
This is great I think. 

Considering that I understood about 1/6th of what you wrote (if that) I will have to take your word on this.  Perhaps I will gain more insight on Tuesday when we speka.

Looking forward to it.

Posted Using [LeoFinance <sup>Beta</sup>](https://leofinance.io/@taskmaster4450le/re-brianoflondon-6tpcec)
👍  
properties (23)
authortaskmaster4450le
permlinkre-brianoflondon-6tpcec
categoryhive-169321
json_metadata{"app":"leofinance/0.2","format":"markdown","tags":["hive-169321","leofinance","hive-167922"],"canonical_url":"https://leofinance.io/@taskmaster4450le/re-brianoflondon-6tpcec"}
created2021-06-06 15:09:03
last_update2021-06-06 15:09:03
depth1
children1
last_payout2021-06-13 15:09:03
cashout_time1969-12-31 23:59:59
total_payout_value0.120 HBD
curator_payout_value0.119 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length325
author_reputation2,172,612,194,467,720
root_title"Coding of Podping: what do you want to build with it?"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,168,368
net_rshares644,822,712,202
author_curate_reward""
vote details (1)
@brianoflondon ·
I'm pretty sure I can explain it quite well! Looking forward to talking!
properties (22)
authorbrianoflondon
permlinkre-taskmaster4450le-quad6g
categoryhive-169321
json_metadata{"tags":["hive-169321"],"app":"peakd/2021.05.5"}
created2021-06-06 15:18:33
last_update2021-06-06 15:18:33
depth2
children0
last_payout2021-06-13 15:18:33
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_length72
author_reputation760,188,324,097,883
root_title"Coding of Podping: what do you want to build with it?"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id104,168,510
net_rshares0