Hive-Watcher - Watching the Hive chain
This project springs from pretty much the simplest code in the entire Python Dev library from Hive.
The idea of watching the chain for specific custom_json's turned into this, simple-watcher.py:
We're only looking for operations with an id in this list (and "hive-hydra" will be dropped, it was only for early testing):
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.
- Vote for APSHamilton's Witness KeyChain or HiveSigner
- Vote for APSHamilton's Witness direct with HiveSigner
- Get Brave
- Use my referral link for crypto.com to sign up and we both get $25 USD
- Sign up for BlockFi
- Find my videos on 3speak
- Join the JPBLiberty Class Action law suit
- Verify my ID and Send me a direct message on Keybase