Solving a pain in the butt (err...back end)
Making apps and websites
Since I've been learning a bit about coding and getting some stuff done I've quickly learned that there are things that you can code for in a web app and things you simply cannot.
An app that tells me how many people hold GLD and how much to pay them?
Not too difficult.
However, once you start adding hidden things? Making submission buttons that go to a database, make logic functions based on those submissions, process keychain operations based on that logic and then show the output on the webpage?
Those are all "back end" functions Things the user doesn't need to see but things the program needs to track and store to make sure everything happens as it should.
Need an example?
Check out
Helios.Surf
On this website there is an option to input a URL, input an amount of HELIOS tokens, click burn and call the helios.voter to upvote the content. For the user it doesn't look like very much. However, behind the scenes? Lots of things are happening.
- Check that the URL isn't too old and generally meets upvote guidelines
- Check the number of tokens that the user has in their account
- Send requests to the Hive Keychain to authorize the burn
But
The burn isn't actually a direct burn. Behind the scenes the website sends HELIOS tokens to be burnt to , a bot needs to check how much voting power the account has, needs to calculate what percentage upvote the post gets based on hive-engine price, how much token needs to be returned to the original sender. That is a LOT of stuff hiding out behind the scenes.
Rear end problems which of course can be a Pain in the rear
For many different websites and programs private databases and server are used. The problem is that databases can be attacked and insecure. Interestingly HIVE stores things forever and makes a very good database. Public but still undeletable storage.
For a HELIOS burn?
Take a peek behind the scenes:
The bot sees the 11 HELIOS incoming.
8.014 HELIOS is burnt (transferred to nul)
2.986 HELIOS is returned to the user.
All stores forever on the blockchain. No questions about whether or not the coin came in, no question about whether tokens were burnt, accountable for all the tokens in excess being return.
Not a private backend but I'm going to guess not that many people dig deep.
Things can be hidden deeper though.
Hive engine transactions like the HELIOS burn are trackable if you know where to look and readable in regular old english language.
But HIVE allows data to be stored directly without being seen by sites like peakd and ecency. That's when it is stored as custom JSON files. Sure they are still public and if you want to hunt down things on the block explorer they are in plain sight....but even fewer people are going to look there.
That's how data like Splinterlands can be kept on the blockchain, stored forever, every battle, every moment stored forever and provable to anyone who needs to look. How cool is that!
Then again make sure you program correctly and make sure your program knows where to look or it can be like looking for a needle in a haystack later to find it.
And I'm just learning
But today I'm trying to figure out ways to improve and automate different things in the GLD community. All backend stuff. How to track the increase in tokens in the curation account so I can accurately determine how much to distribute weekly. How to hunt down stock information online using public API's and then take that data, store on HIVE to make a traceable value for NFT's tracked to those stocks. ....and more things that are sapping my will to live.
However, I know it will be worth it when its all done. I'm also super happy that HIVE stores data for free (as long as I have Resource Credits) and forever. Once I know I can store data and it won't be tampered with it makes me a lot happier.
More than just social media
Why do I mention this?
So many people think of HIVE as just as place to make money by writing articles. A project to turn social media to the blockchain. However, if you look a little deeper....literally..... there really is more to HIVE than meets the eye and using it as a backend for developed apps? Something I find fascinating.
Not perfect.
... probably way more limited than many other back end solutions.
......but interesting nonetheless :)
Of course I'm still very much a noob and have an awful lot to learn. If any one more skilled than I am has comments? I'd love to hear in the comments :)
Thanks for dropping by.