Podping is ready for HF25: here's what we did

Just over a week and a half ago the @podping Dapp which I'm championing stopped working for a few hours. That was its first stoppage since it had been turned on over a month ago. I wrote about that stoppage in this post.

Podping sends out notifications when a podcast has been updated: each notification can trigger any listening app or device to download a new episode of that show. A growing number of podcast hosting companies are sending notifications out this way and a growing number of services are watching for updates this way.

Well the problem we hit with Podping was related to today's upcoming HardFork HF25 and after my reports many others started seeing the same issues. It was actually joined by a different problem which affected Javascript based projects as well and @blocktrades has covered the issues properly in his recent update.

But in essence the answer meant we had to update to the newest version of Beem (0.24.26) and we made some very minor changes to the original version of Podping which has been running from the start.

The Programming Details

The specific failure which we got missing required posting authority:Missing Posting Authority podping.bol occurred: <class 'beemapi.exceptions.UnhandledRPCError'> had nothing to do with our code, and it only started occuring when we tried to send a transaction through one of the growing number of API Nodes which were upgrading to Hive HF25.

The active part of the Podping code as far as posting to Hive is concerned, is a recursive function that tries to send_notification(url_list) of a list of URLs of podcasts. If that fails it tries again after a delay. Within that function, the Python library for Hive, called Beem, is supposed to also keep trying till it succeeds. That is the bit which was failing but which Beem has now fixed.

Anyway I realised that the way in which my original code failed "Just give up" could use a little improvement.

image.png

The version on the right is what I've added. DON'T GIVE UP (in large friendly letters...

And if it does ever reach that condition, it spits out the URLs it failed on but goes back to trying some more ones.

This is all somewhat academic as a much more sophisticated, asyncio based version is in the works.

The upgrade process

I don't run the machines which run the Podping service, those are managed by Dave Jones at @podcastindexorg and I passed this new code onto him along with the single upgrade command pip install beem==0.24.26. He currently runs 3 servers, geographically spread, but it is mostly the US server that does all the work.

In front of these 3 servers is a private API front end which authorised users can send a GET request to. Those authorised users right now are the big podcast hosting companies currently signaling whenever their customer feeds have changed. The front end sends requests to the 3 Podping servers though in reality nearly all requests go to the server in the USA.

image.png
First ping from the USA based Podping server: https://hive.ausbit.dev/tx/8dcb8555005f2e7c01f44e99f54d7a1bae95c5e7

All Dave had to do was successively take down, upgrade and then restart each server. As he did this he made one other change. When we started this grew out of something called "Hydra" which I renamed @hivehydra. That account name was doing all the pinging. Going forward we have @podping related names.

As soon as Dave turned off the USA server, one of the others started pinging and as soon as the USA server was back up, it started pinging.

Zero downtime and nobody noticed. Exactly what all Dude's Named Ben aspire to.

The real Version 2.0.

The next version of Podping is a complete rewrite and I really think I might have to do a video showing the code. I've had a lot of help from @alecksgates and learned a whole lot about Async Python which others might learn from.

Going forward for @podping, I've been discussing setting up a new API node, first privately, then possibly publicly, with @someguy123 which is what a good chunk of the funds we're getting from the DHF is earmarked for. As soon as the dust settles on this upgrade and HF25 later today, I'll get back on that.

Once again thanks for all the support and here's to many more podpings!


brianoflondon hive footer.png

Sort:  

Congratulations @brianoflondon! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You distributed more than 64000 upvotes.
Your next target is to reach 65000 upvotes.
You received more than 12000 HP as payout for your posts and comments.
Your next payout target is 13000 HP.
The unit is Hive Power equivalent because your rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Hive Power Up Day - July 1st 2021 - Hive Power Delegation

This might be related to what I thought was a bug. It went away after reverting the code, but maybe that was a coincidence. Have you thought about making your code ready for the new permanent testnet? I've noticed the two nodes I know about do not have CORS headers set. So, if you plan to use JS hosted in a browser and use these testnet nodes, you'll have to run your browser in a insecure mode. This only effects my code when running with testnet. So I am just trusting my code and the hundreds of dependencies if I use this. I'm setting up the testnet option on Blue Brain so I can use tests and TBD rather than Hive when testing.