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

in Programming & Dev11 months ago

I've been drumming up support for my @podping Proposal 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

The idea of watching the chain for specific custom_json's turned into this,


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 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:

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 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:


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!

Support this as proposal 181 on PeakD
Support proposal 181 on Hivesigner

brianoflondon hive footer.png


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 Beta

I'm pretty sure I can explain it quite well! Looking forward to talking!

May I suggest for line 57:

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.

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.