HAF Update

in #hive-1679223 years ago

blocktradeslogo.png

Hive Application Framework

Yesterday @blocktrades made a very important announcement about the HAF technology being developed. I didn't really want to read it because it seemed pretty heavy and technical, but it actually wasn't that bad, and it got me very excited for the future of this network.

Some context.

Last year I was very excited to be working on my own project and my own token (Magitek). I made some good progress and learned a lot. Spent a couple hundred hours on it. The problem was I hit a major wall.

When I started the project I thought that decentralizing it wouldn't be that big of a deal. After all it relies on (second layer) derivative consensus, meaning that all of the data required is inside the Hive blocks, therefore I shouldn't have to worry about decentralization because the data in the Hive blocks is already decentralized.

Hm, yeah, that's not how it works.

So I was thinking even though I'd be the only one with a node to start, anyone would be able to boot up a node/frontend for Magitek. This would make it decentralized, or so I thought. But then I realized that even if someone boots up another node, if our nodes aren't connected and no one can roll back bad blocks, then it wouldn't matter. Two nodes would be two completely different networks, even if the data on those networks happened to be identical at any given time.

I started thinking about: what would happen if my node/data-stream got hacked or if my database got corrupted or whatever else. Even if other nodes were up and running they wouldn't be able to tell my node it was wrong, and thus I got a bit frustrated with the sheer complexity of moving forward with the project and quit.

Granted I could have been working on it this whole time and had a centralized version up and running. That would have been fine for the most part, but that's not what I wanted, so I did not pursue that outcome.

magitekarmor.jpg

https://peakd.com/hive-139531/@blocktrades/a-developer-s-introduction-to-the-hive-application-framework

So when I heard about HAF technology being developed, I was thinking: "Isn't that like exactly what I need to decentralize Magitek? I'm not sure but I think so." After reading @blocktrades' post yesterday I received overwhelming confirmation that this is in fact the case. HAF is exactly what I need.

In fact, I would go so far as to say that the HAF is perhaps the single greatest core technology that will perhaps ever be invented by Hive. The crazy thing is that it won't even require any kind of fork to implement. This is second-layer technology at its finest.

image.png

One of the most powerful features offered by HAF as a service to apps is that it enables apps to easily maintain consistent internal state when transactions are reverted by a blockchain fork.

yesmeme.png

In the case of a blockchain fork, the transactions for a post and all its votes could be reverted (either temporarily or even permanently). When this happens, the app has to undo all its internal state changes that occurred because of those reverted transactions. In other words, a normal blockchain app has to build an “undo” action for every internal state change it makes when it processes a new blockchain transaction, then apply all those undo actions in reverse order when a fork occurs.

The hive fork manager eliminates the need for such undo code.

In practice, this should cut in half the amount of code that is required to write a blockchain-based dapp and it also eliminates the chance for errors that can result if manually-written undo actions don’t get properly updated as the app’s functionality gets updated over time.

Yep, exactly what I needed.

This technology will streamline dapp production in a modular way that not only cuts down on development time but also will greatly reduce the chance for bugs to proliferate. It's going to save a lot of time, but more importantly it's going to open up an entirely new level to scale up and maintain robust code.

Conclusion

I'm very impressed by this fundamental development. This is definitely making me want to boot my Magitek project back up and work on it like 12 hours a day like I was doing last year. HAF is exactly what Hive needs to scale up to levels that rival even the top blockchain projects. In fact, with technology like this, Hive can easily scale larger than Ethereum (albeit Ethereum will be more secure, but infinitely more expensive).

When we combine the feeless and non-competitive nature of Hive block production and then weave this modular second layer solution into the protocol, Hive gains a massive amount of power. It will also be very interesting to see what kind of work developers start to do with the HAF servers themselves. It very well may turn into a situation where developers can use a HAF server without actually haven't to set one up themselves. Thus, the HAF API may become just as important (if not moreso) as the Condenser API. Or perhaps I'm saying that wrong, as the HAF API may fully replace the Condenser API (not really sure if Condenser API will be a smaller subset of HAF itself).

In any case, development continues. This is really good news and it sounds like HAF is set to launch soon™. Once we have this tech launched in addition to RC pools this network is going to gain a ton of momentum. Now I just need to reach whale status before our token gets back up to all time highs.

Posted Using LeoFinance Beta

Sort:  

Good update on this and it is really looking so good too.

wen magitek?

Posted Using LeoFinance Beta

WEN

Electronic-terrorism, voice to skull and neuro monitoring on Hive and Steem. You can ignore this, but your going to wish you didnt soon. This is happening whether you believe it or not. https://ecency.com/fyrstikken/@fairandbalanced/i-am-the-only-motherfucker-on-the-internet-pointing-to-a-direct-source-for-voice-to-skull-electronic-terrorism

HAF is exactly what Hive needs to scale up to levels that rival even the top blockchain projects.

I haven't fully put this to the test yet but agreed - if we are going to grow hive we need things like this to enable more developers to create cool stuff that nobody has yet imagined :)

Wow I didn't understand what was so game changing about HAF before your post. I thought it was more along the lines of a way to log in without having to worry about your keys.

Posted Using LeoFinance Beta

HAF is evidently going to make life easier for developers to integrate into Hive. It seems like the database management is now turned into something that developers are accustomed to and understand.

The core team handles the base layer and feeds it into HAF which allows others to integrate in with languages they know.

Seems like it can be a major boost to development.

Posted Using LeoFinance Beta

A major boost to development AND offloads some of the heavy lifting on the nodes because they won't be hammered for excess data when all we need can be provided by consuming highly tuned SQL queries :)

It is nice to see the internal momentum growing and this is an exciting development.

Posted Using LeoFinance Beta

Cheers for adding a bit more human context to the extremely heavy introduction to the Hive Application Framework post.

Looking forward to the day that the true potential of the Hive blockchain is realised!

Posted Using LeoFinance Beta

Yes, when they first started talking about this last spring/summer I got really excited. The way I understood it then was that outside devs would be able to build their own dapps on HIVE using code they're already familiar with, and HAF would take care of any communication necessary with the HIVE blockchain. It seemed like that would be an absolute gold-mine for bringing in devs.

Why reinvent the wheel when you can use what you already know AND build on the cheapest most scalable blockchain in existence?!? Seems like a no-brainer to me.

I also agree with you that when the world starts figuring out what this can actually do, Hive will not be a cute little blogging chain anymore. The sky becomes the limit. Can't wait to see this get implemented.

Speaking of that, early on there was talk of a possible airdrop for this. Have you heard anything more about that?

Posted Using LeoFinance Beta

The airdrop will be for a future smart contract processor that will be built on top of HAF (we don't have a name for the smart contract processor yet).

So another Project "Blank". lol Super excited about this. Thank you guys for putting it all together. This really feels like the piece that could get the snowball rolling down the hill. Awesome work!

Posted Using LeoFinance Beta

I am also working on developing an application. I can say that I am just getting started. HAF technology seems quite efficient and successful. HAF might be what I need too so I'll look into it further. Thanks for sharing.

Posted Using LeoFinance Beta

What type of app are you working on?
Not looking for specifics but just wondering what will be coming down the road on hive over the next couple of years.

My main goal is to develop an NFT based game. But before that, I aim to develop an application where users in the Hive community can communicate with each other. I don't know if the Hive community needs this app, I will post an article about it soon. The feedback I get from users will be very effective in starting the application. I'm currently reviewing sample codes and frameworks, this will increase the experience of developing applications on the blockchain.

Posted Using LeoFinance Beta

Good to see some feedback on it.

What are you finding to be beneficial?

Posted Using LeoFinance Beta

I did not have any previous experience with the Hive Application Framework (HAF) and I can say that I just started researching it. And to share my first impressions.

I think that working with data in PostgreSQL database will be much more efficient and faster for me than working on data in blockchain. And I think HAF based application will be faster. I have sufficient knowledge of MySql, Oracle, MSSql. I have no experience in PostgreSQL, but I know that I will not have any difficulties. I see that there are useful add-ons in HAF and I think they will be very useful for me. Especially in the case of a blockchain fork, the rollback action caught my attention. It is the most important issue for a programmer and database administrator. It happened to me, sometimes it can take days to fix the mistakes.

I'm currently reviewing the code for HAF on https://gitlab.syncad.com/hive/balance_tracker/-/tree/develop it will improve my coding experience on the blockchain. I haven't set up a HAF server yet, but I'm planning to setup a HAF server soon. In this way, I think that I will have the opportunity to examine the sample codes in more detail and that I can write sample codes myself. This will increase the experience.

I have developed many applications but no experience in blockchain. I'm reviewing sample codes and articles to develop my own application on the Hive blockchain. Hopefully when I feel ready I will start writing code to develop my own app.

I also believe that HAF will both make it easier for me to write code and reduce the amount of code. I don't know much about HAF at the moment, but I hope to share more experiences in the future.

Posted Using LeoFinance Beta

I don't think PostgreSQL is all too different for normal queries so you should be fine moving over the queries. I do think writing function blocks might be different though and it might be annoying if you need other people's packages.

Posted Using LeoFinance Beta

PostgresSQL is probably one of closest SQL clones to Oracle (closer than Microsoft SQL, for example). It is also very fast. And the docs for it are very good.

Hive blockchain has great advantages and experience in the Web 3.0 space and with dapps being able to be built easier it can boost it up even more. Let's see how soon will this be released.

Posted Using LeoFinance Beta

I don't know what is more exciting about this post, the fact that they are building HAF or the fact that Magictek might see the light of day! I hope they can get this implemented pretty quickly and it ends up doing what you need it to.

Posted Using LeoFinance Beta