Hive application development guide

avatar
(Edited)
Authored by @thebeedevs

Hi Everyone ❗❗

Especially HiveFest 2024 visitors who are interested in simplified and efficient application development for Hive Platform.

During many talks with you we promised to provide you with some tips how to start designing your application architecture to match all the tools currently available on the Hive Development stack.

In our vision of the current stack, at an application high level design, we have a few cases which determine used technologies, tools and required resources. Such use of the cases is ideally matching a:


H like a History: your workload requires you to analyze blockchain operations from the past.
To do it you will probably need a local instance of HAF node holding all blockchain operations or just part of it due to filtering capabilities supported by HAF.
Next sections will bring you some details related to HAF configuration details..
Alternatively - your application can refer to some API results taken from a remote endpoint. In this case, you can use a new set of REST API providing results specific to account history, regular block contents. You can find such APIs at: https://api.syncad.com . There is also available swagger documentation describing specific API calls.

IV.png
I V like a Initiate a Venture ( a little word game 😀 ) to perform a blockchain activity by pushing new operations to it.
If your application doesn't really care about the past and only wants to use a Hive platform as a secure transport layer, you can easily create the app just by using a BeeKeeper and Wax libraries to prepare, sign and broadcast transactions.
Below we are also presenting in greater detail an example application being able to
push own operations to the blockchain.
E.png E like Event consuming 😀 In Hive Platform can be also a lightweight and simple process.

The idea behind it is to make the process of catching blockchain data natural and easy to understand for regular programmers. To do it, we prepared another frontend library: WorkerBee, which allows you to write your own bots. The third part of this article will show you an example that is very easy to understand without any specific knowledge of blockchain.

Using HAF instance to process blockchain data


haf.png

Local HAF-node will allow the direct use of a SQL database holding relational representation of blockchain operations, divided into blocks and transactions.This solution gives you best ability for massive data processing (since you have direct access to them in local database), but it also brings the biggest resource needs - full deployment can even need 4TB of disk space.

Beside HAF-node, you will also need your backend application - SQL based - which will be continuously processing the operations incoming into HAF database and collecting data specific to your application schema.
During this process the whole interaction to blockchain is hidden by HAF - your task is just to program SQL data processing.

We will describe setup steps soon in a separate article (including example deployment of small HAF lab and some simple HAF application). The impatient ones please go to HAF deployment

Performing blockchain activity - broadcasting transactions


beekeeper_wax.png

Execution of operations on blockchain requires specific steps and a little knowledge of Hive blockchain technical side.
The first thing that you need to know is a set of operations supported by the Hive platform. You can find them in the Hive repository

It is also worth mentioning that you are not limited to the set of operations already included in the Hive Protocol. The Hive Protocol allows you to push operations being really unknown for blockchain itself, but being recognized by your application. To use this magic feature, you just should use a custom_json operation.

Finally, to send operations to the blockchain, they must be wrapped in a transaction and then signed using authority used to perform the operation. Transaction is an envelope holding multiple operations and account authority data, needed by blockchain processing algorithms.

To materialize this workload, you don't even need ANY backend services nor data storage: just the frontend part (using Beekeeper & Wax Typescript features) of your application could be sufficient to perform such activity. Wax hides all blockchain complexity and makes transaction creation process easy.
Beside web browsers, both libraries can be also used as a part of NodeJS deployments, so without touching other technologies than JavaScript, you can make fully functional applications, holding your own data and performing some server-side data processing.
Here is a link to TS example preparing some transaction: pushing a comment reply

Watching for blockchain events


workerbee.png

To make this process easy to understand for frontend programmers, we decided to use some well known libraries: events and RxJS to build observable model on. The WorkerBee library hides some blockchain specifics (i.e. a need to call some APIs) and allows you to focus only on processing events when:

  • some property of interested account will change
  • interesting transaction will be detected in blockchain
  • you can also be tied to each produced block

Here is an example application watching some Hive account and sending notifications to the Telegram bot (created separately). It is worth mentioning that the amount of code specific to Hive (actually calls to the WorkerBee library) is just a small part of this program: the rest is specific to Telegram protocol handling.

Event notifier talking to telegram

Thanks for reading and we are waiting for your feedback.



0
0
0.000
10 comments
avatar

Congratulations @small.minion! You received a personal badge!

Happy Hive Birthday! You are on the Hive blockchain for 1 year!

You can view your badges on your board and compare yourself to others in the Ranking

0
0
0.000
avatar

Congratulations @small.minion! You received a personal badge!

Happy Hive Birthday! You are on the Hive blockchain for 4 years!

You can view your badges on your board and compare yourself to others in the Ranking

0
0
0.000
avatar

Congratulations @small.minion! You received a personal badge!

Happy Hive Birthday! You are on the Hive blockchain for 5 years!

You can view your badges on your board and compare yourself to others in the Ranking

0
0
0.000
avatar

Congratulations @small.minion! You received a personal badge!

Happy Hive Birthday! You are on the Hive blockchain for 6 years!

You can view your badges on your board and compare yourself to others in the Ranking

0
0
0.000
avatar

Congratulations @small.minion! You received a personal badge!

Happy Hive Birthday! You are on the Hive blockchain for 2 years!

You can view your badges on your board and compare yourself to others in the Ranking

0
0
0.000
avatar

Congratulations @small.minion! You received a personal badge!

Happy Hive Birthday! You are on the Hive blockchain for 3 years!

You can view your badges on your board and compare yourself to others in the Ranking

0
0
0.000
avatar

A lot of neat stuff to chew on, great to see some of these so much needed DX tools start to appear. Will take a look and leave comments for sure.

0
0
0.000
avatar

Let's delve into the Builda whale farm on the Hive, Gogreenbuddy, who is also colloquially known as the Marky mark USAINVOTE UPMYVOTE IPROMOTE PUNKTEAM and 100's more if not thousands this individual has asserted that his intentions behind this initiative are driven by a desire to contribute positively to the community. Now, let's explore what he is earning on a monthly basis from this venture. income is said to be generated through the use of multiple alternative accounts, which he utilizes to cast votes in favor of his own shit content. The community seems to have mixed feelings about this practice many are scared to speak up.

Are you ready to delve deeper into this topic and uncover more insights? If so, let's proceed. It's time to wake up and gain a clearer understanding of the situation at hand.

Buildawhale

Curation Rewards

Total rewards according to loaded activities and filters
Time loaded: 25 days ago
Total HP: 15,283.568
Total HBD: 0.000
Total HIVE: 0.000
https://peakd.com/@buildawhale/activities

The Marky mark

Curation Rewards

Total rewards according to loaded activities and filters
Time loaded: a month ago
Total HP: 13,913.812
Total HBD: 0.000
Total HIVE: 0.000

https://peakd.com/@themarkymark/activities

Usainvote

Curation Rewards

Total rewards according to loaded activities and filters
Time loaded: Jul 20, 2024
Total HP: 7,026.082
Total HBD: 0.000
Total HIVE: 0.000

https://peakd.com/@usainvote/activities

Apeminingclub

Curation Rewards

Total rewards according to loaded activities and filters
Time loaded: Jul 22, 2024
Total HP: 28.306
Total HBD: 0.000
Total HIVE: 0.000

https://peakd.com/@apeminingclub/activities

Gogreenbuddy

Curation Rewards

Total rewards according to loaded activities and filters
Time loaded: Jul 15, 2024
Total HP: 1,960.063
Total HBD: 0.000
Total HIVE: 0.000

https://peakd.com/@gogreenbuddy/activities

On Hive a significant issue exists with automatic upvotes consistently rewarding the same individuals day in and day out

We want to address the issue of downvoting. It has caused pain to many people, and we want to make sure it doesn't happen again reply to @jacobtothe

On Hive a significant issue exists with automatic upvotes consistently rewarding the same individuals day in and day out

We hope that those who genuinely care about Hive will reconsider their actions, as continuing down this path could inadvertently harm innocent users who are unaware of these issues

lol the Marky mark keeps dreaming

There's been a notable increase in frustration and concern among many users

Reply 2 @crimsonclad You may consider yourself clever

Reply to @crimsonclad

Consider revising the value plan, as it's not providing significant benefits to HIVE

The Value Plan, as it stands, seems to be a one-sided relationship with the HIVE platform, where the benefits are one-way

Actions indeed speak louder than words, a fact we've all observed individuals may talk a good game, a whole lot of shit, but their actions often expose their genuine nature LOL

We consider it unwise to engage in harmful actions, even if you think you can escape the repercussions

https://hive.blog/politics/@jacobtothe/re-bpcvoter1-shjdc8

The Hive Police aka Hivewatchers, are the real heroes of Hive LOL, aren't they?

Feast your eyes on Hive's trending page, what a load of trash

LoL it's the Hivewatchers Hive Police, dishing out orders like a bakery LOL! Folks, do what you want with your Hive power, just as you please. And you, Hivewatchers, downvote away, but remember, judgment day's coming

Harry fam We're just here, laughing at the shenanigans on Hive! Sure, our content's getting downvoted, but hey, it's all part of the game LOL

https://hive.blog/hive-158694/@hivewatchers/shhnhs

adm [-]
meesterboom [-]
steemcleaners [-]
jacobtothe [-]
logic [-]
chekohler [-]
b00m [-]
celestegray [-]
citizensmith [-]
sazbird [-]
technicalside [-]
bagpuss [-]
vxn666 [-]
spaminator [-]
meestemboom [-]
ihal0001 [-]
tillmea [-]
meesterleo [-]
meesterbrain [-]
unclefunker [-]
and 1 more

https://hive.blog/hivewatchers/@bpcvoter/shqkqc

On Hive, there's a user who frequently burns a significant amount of Hive LOL with his own accounts

How To Fool An Entire Population

it's so, so concerning to see Blocktrades delegating 2+ million Hive power to Buildawhale, and Buildawhale is downvoting legitimate content

We began sharing factual information following unwarranted downvotes on Hive it's all in the transactions

Upon examining our posts, you will notice they have been downvoted, and we've been labeled as scammers and spammers, which we find amusing. We consistently share new content

Once again, we ask why is our legit content being downvoted on Hive and what is the reason behind it. Hivewatchers ADM spaminator steemcleaners guiltyparties logic

We have Hive witnesses farming Hive, self-voting, operating comment farms, and self-funding projects with community resources

https://peakd.com/@themarkymark/activities

https://peakd.com/@buildawhale/activities

https://peakd.com/@blockheadgames/activities

https://peakd.com/@hiveauctions/activities

https://peakd.com/@gogreenbuddy/activities

https://peakd.com/@meritocracy/activities

https://peakd.com/@gogreenbuddy/activities

https://peakd.com/@jacobtothe/activities

https://peakd.com/@usainvote/activities

https://peakd.com/@leovoter/activities

https://peakd.com/@usainvote/activities

https://peakd.com/@upmyvote/activities

https://peakd.com/@apeminingclub/activities

https://peakd.com/@punkteam/activities

Posted using Bilpcoin

!INDEED !WEED !PGM LUV !PIZZA !PIMP !ALIVE !CTP !BBH !VSC !INDEED !HOPE

Delegated: 4,046,288 HP
Search
@buildawhale 2,308,692 HP Sep 29, 2017
@ocdb 1,171,244 HP May 25, 2018
@usainvote 566,245 HP Aug 16, 2020
@blocktrades.spk 106 HP Aug 8, 2022
Received: 54,605 HP
@kriborin 18,559 HP Aug 9, 2017
@kevtorin 18,559 HP Aug 9, 2017
@lessys 17,093 HP Aug 9, 2017
@aprendizinfinito 129 HP Mar 11, 2022
@klinckify 111 HP Apr 19, 2021
@rt-international 109 HP Dec 14, 2023
@augusto2021 11 HP Dec 22, 2021
@spearhead1976 11 HP Nov 20, 2022
@titovieira 10 HP 5 days ago
@realazazel 4 HP Jun 15, 2020
@stunod 4 HP Feb 8, 2022
@pumpkinmimi 2 HP Oct 15, 2021
@logiczombie 1 HP Dec 24, 2021
@africka 1 HP May 12, 2020

https://peakd.com/@blocktrades/wallet

https://www.reddit.com/r/stoptheabuseonhive

https://hive.blog/hive-167922/@bpcvoter2/https-peakd-com-themarkymark-activities-they-are-are-now-trying-to-hide-to-builda-whale-curation-rewards-lol fc887878787dansteeeveginaeddiecrimbogeerickgogreen pppppppppppppooooooo yuyuyuyuyuyuyu cvzxxxzxzxzx 6666688899999999 878655654 67878656

0
0
0.000
avatar

Congratulations @small.minion! You received a personal badge!

Happy Hive Birthday! You are on the Hive blockchain for 7 years!

You can view your badges on your board and compare yourself to others in the Ranking

0
0
0.000
avatar

Hola, excelente post. te dejo mi voto y te sigo, saludos.

0
0
0.000