Introducing the Leo Lightning DB Layer for Hive | Speed of Web2, Principles of Web3

avatar
(Edited)

Introducing the Leo Lightning DB Layer for Hive  Speed of Web2, Principles of Web3.png

The Leo Lightning DB Layer is something we've been developing for nearly 6 weeks now. The project has taken much longer to develop and release than we anticipated, but the resulting product is even better than expected. After weeks of backend development and countless rounds of testing (including 2 live fire tests), Lightning DB is now in production on https://LeoFinance.io and appears to be stable.

What is the Lightning DB Layer?

Lightning DB is the name we gave to this project. The entire premise is to bring the Speed of Web2 to the Principles of Web3.

Hive gives us the principles of Web3 by providing a decentralized, scalable and fast database for storing user data and user generated content (UGC). One issue with Hive is that the APIs can sometimes slow down the display of data on the frontend. For the most part, this is not an issue at the first layer. You can find that there are small delays in certain actions (i.e. a few seconds delay for comments and other actions).

To combat this, we built an Actions Queue to allow users to rapidly upvote/comment, etc. on LeoFinance.io and allow the Queue to deploy those actions in sequence on the backend of the site.

This allows users to interact without seeing all of those "Blockchain Errors" when they're rapidly committing actions on the frontend, but the speed caps still exist. Since LeoFinance exists on the second-layer of Hive (currently on Hive-Engine and soon migrating to our standalone second-layer), there is an additional delay on certain aspects of the site.

These delays especially impact:

  • Comment times
  • Post Publishing times
  • Trending/Created/etc. content feeds
  • Wallet Page
  • .....

LeoFinance depends heavily on the speed of both Hive APIs and second-layer APIs. While our upcoming second-layer project is much faster than Hive-Engine, neither that layer nor Hive itself will ever have the "Speed of Web2". This is simply due to limitations, even if they are only a few seconds (which is much faster than other blockchains).

A workaround is the Lightning Layer that we have developed.

The Lightning Layer is a database that exists on the backend of https://LeoFinance.io. When users commit actions on the frontend, they are instantaneously deployed to this layer and displayed on the UI frontend. From there, the layer speaks to the Hive blockchain directly and sends those actions to the chain.

image.png

You could think of Lightning as a sort of "Middle-man caching layer" that serves as an instantaneous go-between for LeoFinance and the Hive blockchain.

Note: the Lightning Layer plays an essential role in the development of #ProjectBlank. More info on this in later announcements.

A Web2 User Experience on Web3

The Lightning Layer is a very backend-heavy project. It doesn't have all the fancy bells and whistles of frontend development where users notice some shiny new feature on the UI.

Instead, it improves the user experience in a much more subtle way. For users that have been on Hive/LeoFinance for a long time, you'll notice the speed enhancements right away. When you load the homepage of LeoFinance.io, load a feed, click on a post and especially when you publish a Post/Comment - you'll notice that it is nearly instantaneous.

The speed is incredible and shows an immediate improvement for all of us who have been here for a while. For new users, however, they expect this speed.

One of the most challenging hurtles from web2 to web3 is usability. As with any new technological breakthrough, Web3 is difficult to get started with and can often have bugs, slow loading times and steep learning curves.

LeoFinance aims to change this and make Web3 as easy to use as Web2. The significant difference is that we are plugged-in to a blockchain which allows us to store data publicly, immutably and in a decentralized fashion. We can also distribute rewards every few seconds on the Hive blockchain to tens of thousands of users.

In short, when you examine the roadmap and developments of LeoFinance, you'll notice a clear trend. Whether it's LeoInfra (instant onboarding & Hive lite accounts) or Lightning DB (caching layer for Hive), we're moving closer and closer to this vision of merging the speed of Web2 with the principles of web3.

What's the Future of Lightning ⚡️?

To see Lightning in action, just load pages/content on LeoFinance.io. On feeds and other pages, the speed improvement is about 20% faster.

User actions - commenting/publishing posts - the speed improvement is 10x... Yes, 10x.

Here is a demo we released on Twitter showing the speed improvement of creating comments. We managed to shave the time needed to publish comments/posts to the blockchain from 9.95 seconds to 0.92 seconds.

It's truly an incredible experience.

https://twitter.com/FinanceLeo/status/1345047768205832201

This is just V1 of our Lightning Layer. In our roadmap, we've scoped out other aspects of Hive APIs/second-layer actions that can be improved with Lightning.

As the project is developed, you'll notice other action become instantaneous. You'll notice further enhancements to page loading times, etc.

Lightning can also handle more than just speed improvements. We've begun playing with a few ideas which could potentially allow Lightning to publish/retrieve data to/from multiple blockchains simultaneously in the background.

If you're paying attention to the Crypto/DeFi space, you'll notice that everything is moving toward this idea of being "Cross-Chain compatible". LeoFinance.io already has cross-chain features (i.e. allowing seamless wallet co-operation between Ethereum and Hive and also allowing Ethereum Metamask users to sign-in to Hive lite accounts and interact on the site), but the future is in deepening this relationship with other blockchains.

Through Lightning, LeoInfra and other projects, we're building bridges to other blockchains now and in the future. Hive is an incredible blockchain for scalable, decentralized data storage. Its future lies in cooperating with other blockchains to adopt their ecosystems and tap into the wider crypto market.

LeoFinance and the LEO/WLEO token economy will be at the center of this expansion.

Test Lightning

We've already spent countless hours testing and fixing Lightning. It's been a rough project to develop, but the result has been 100% worth the effort. This project is essential for #ProjectBlank and a few of the other key aspects on our roadmap.

Lightning may still encounter issues from time to time. If you spot any issues, please report them in Discord so we can deploy patches quickly and keep Lightning online.

Other Announcements

Lightning has taken a significant amount of focus to deliver, but we have a number of other projects being developed simultaneously. I'd like to take this time to announce that there are a lot of announcements that we will announce in the near future.

#ProjectBlank development is currently the core focus as we try to roll it out in the next month. This project is massive and brings a level of content creation and interaction to the Hive blockchain that has never before been possible. In fact, we're currently developing a new solution for handling "Blanks" (think "Tweets") on the Hive blockchain.

As many of you know, ProjectBlank does not utilize top-level content. We've run through a few different ideas for handling "Blanks" (Tweets), but have finally come up with a solution that we think brings the best of both worlds. Lightning ;) fast speeds and immutable content on the Hive blockchain.

Much like Splinterlands did with custom JSONs on Hive, ProjectBlank will change the way you view content creation on the blockchain. Posts are just scratching the surface of what is possible and ProjectBlank will dive beneath this layer and create something entirely new.

The new LeoFi dashboard is also being developed right now. This new dashboard will introduce an entirely new use case for LEO POWER in V1 and will add cross-chain "DeFi" applications in subsequent versions. This will allow users to interact with the WLEO Geyser and other Fi applications we develop. The expected release date of LeoFi is roughly 3 weeks from today. ProjectBlank should launch around the same time, depending on the speed of our development and closed Alpha tests.

We're still working on the LeoFinance Whitepaper which outlines a lot of these projects and importantly, the future of LeoFinance. With every day that passes, this paper gets longer and more nuanced. Stay tuned for the announcements.

Update on Lightning:

30 minutes after this post went live, we had to roll back Lightning for a key performance update.

After making some significant changes and upgrades, Lightning is now back online, stable and faster than ever before ⚡️

 

 

LeoFinance is a blockchain-based social media platform for Crypto & Finance content creators. Our tokenized app allows users and creators to engage and share content on the blockchain while earning cryptocurrency rewards.

Track Hive DataNew Interface!About Us
HivestatsLeoFinance BetaLearn More
Trade Hive TokensWrapped LEOHive Witness
LeoDexwLEO On UniswapVote

Support LeoInfra's Onboarding Efforts by Delegating HP to @leo.voter (Currently at 2.4M HP). We Use this to Claim Accounts and Delegate RCs to Newly Onboarded Users

Posted Using LeoFinance Beta



0
0
0.000
78 comments
avatar

MORE POWER!!!! Little change like this but really big on the back end a lot of work. However it makes the user experience 100x better when interacting with content and that's what matters! Well done guys/gals

Posted Using LeoFinance Beta

0
0
0.000
avatar

I am not sure I would call this a little change.

Actually it is rather large.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Most necessary update keeping Microblogging in mind according to me.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Not just microblogging. This is primordial user experience. If I need to wait multiple seconds for a post to load... I’m gone before your content has fully loaded.

Only fans, and people purely focused on making bucks, will tolerate and suffer that experience. 3 Seconds to “mark as read”? Geez, what era do we live in? That’s 1998 server performance. Not millennial will swallow that shit.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Agreed.
The users who doesn't know how Hive blockchain works / block time etc might get frustrated and leave..

Posted Using LeoFinance Beta

0
0
0.000
avatar

This is Masterful mareketing lol

What IS a database anyway?

Imagine LEO EDUCATION

LEO SCHOOLS?

MY GOD
private school vouchers converted to investment as subscription for legal private schools could fund leo to $100 and kids would actually get paid to go to school LIKE THEY ONCE PROMISED US as children in the 1990s while watching VHS tapes about how schools worked in the Oil Rich Middle East ... man the teacher laughed at us i remember when we asked why WE couldnt get paid if america was so rich... a good teacher would have just pointed outside to the aircraft carriers in the bay lol @sandiegocoin

0
0
0.000
avatar

This is Masterful mareketing lol

What IS a database anyway?

Imagine LEO EDUCATION

LEO SCHOOLS?

MY GOD
private school vouchers converted to investment as subscription for legal private schools could fund leo to $100 and kids would actually get paid to go to school LIKE THEY ONCE PROMISED US as children in the 1990s while watching VHS tapes about how schools worked in the Oil Rich Middle East ... man the teacher laughed at us i remember when we asked why WE couldnt get paid if america was so rich... a good teacher would have just pointed outside to the aircraft carriers in the bay lol @sandiegocoin

0
0
0.000
avatar

Great to see this rollout. It is a vital piece to the Leo ecosystem. This now makes the Web 2.0 development and user experience applicable but with the Web 3.0 benefits.

The fact that we are dealing with decentralization, or as much as we can, at every step of the process is crucial. We are seeing how dangerous the centralized entities can be.

From here, we are going to see a massive explosion in the Hive and Leo ecosystems. A month from now, there will be an entirely different view of what things are around here.

Get ready, a lot of stuff is about to take off. The developers are providing the tools which will cause a massive explosion.

All who are involved in Leo are going to be very happy campers (lions).

Posted Using LeoFinance Beta

0
0
0.000
avatar

"This now makes the Web 2.0 development and user experience applicable but with the Web 3.0 benefits."

Exactly! This is one of our guiding principles as we continue to develop LeoFinance and sister applications. Usability of Web2, benefits of Web3.

Happy 🦁s indeed. ProjectBlank requires Lightning for a few key operations (as especially seen in the new content layering we've created to handle bottom-level "Blanks" a.k.a. Tweets).

Everything is coming together nicely. Still trying to crank out the Whitepaper so everyone can see where the ship is headed from that bird's eye vantage point

Posted Using LeoFinance Beta

0
0
0.000
avatar

This is awesome.

Out of a non-dev position, is there something to stop someone stacking quickly and attacking the queue?

0
0
0.000
avatar

The Queue has already been in production for a few months now. We do have rate limiting in place to avoid attacks and a few other barriers that a malicious attacker would have to deal with.

The queue can also shut itself down in the event of something like that happening. In this case, actions on the frontend would simply act more like "Hive.blog" and not have a queue until we eliminate the threat and redeploy.

Lightning utilizes more of a "Caching" approach to collect and serve content. This has similar protocols to the Queue database.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Very nice. I am hoping that more frontends will follow suit and start thinking about UX, not just the tokens.

Posted Using LeoFinance Beta

0
0
0.000
avatar

I have been loving it so far this morning. Great stuff. It is such a huge difference for me in productivity. I really appreciate the time and effort you folks have put into this!

Posted Using LeoFinance Beta

0
0
0.000
avatar

It's all about the UX :) glad to hear you're liking it. It was a lot more work than expected, but I think it was well worth it

Posted Using LeoFinance Beta

0
0
0.000
avatar

It definitely was and if you can use it in the future for some of your other projects then it is totally a win/win!

Posted Using LeoFinance Beta

0
0
0.000
avatar

The redonk slow load times espeically on mobile was the main reason I never used the leo front end and opted for peakd or dapplr but now that its sorted this is going to become my front end of choice

Posted Using LeoFinance Beta

0
0
0.000
avatar

It's getting hot in here. Can you hear the cracking of the lightning storm? February will be epic. Can't wait to start _____ing.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Speed and more development, basically Leo working towards a flawless user's friendly interface is awesome. I believe it aids even more adoption. Well-done to the team and Khal

Posted Using LeoFinance Beta

0
0
0.000
avatar

Epic; hopefully other Hive front ends follow suit with this.

0
0
0.000
avatar

This is incredibly exciting. I believe you guys are breaking barriers for Hive as a whole and other communities need to start playing catch up if they want to thrive alongside you.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Amazing work! Lightning really does make a noticeable difference already, even though its biggest benefit is paving the way for the future. I'm even more excited for #projectblank now.

Posted Using LeoFinance Beta

0
0
0.000
avatar
(Edited)

This is awesome! Great work to all the LEO team! I'm excited to see the potential here. Keep it up!

0
0
0.000
avatar

One of the most challenging hurtles from web2 to web3 is usability.

I agree.

LeoFinance is keep on BUIDLing

Posted Using LeoFinance Beta

0
0
0.000
avatar

It might seem not a big deal but the user experience right now just got 10x better.

You forgot to mention that it impacts voting too or I missed it? First comment I dropped and I was like "Whaaaat? wtf did just happen" Then I realized that lightning was implemented. There was no other explanation

Posted Using LeoFinance Beta

0
0
0.000
avatar

Well I posted on discord too about this bug ( or not a bug ? I am not sure ) . When my RC was too low , it didn't say RC was low so reply wasn't successful it just said reply successful but later on the comment just disappeared.

Posted Using LeoFinance Beta

0
0
0.000
avatar

A very nice update, and it sounds like you have a pretty good road map you are following along with and avoiding the side tracks that can often derail projects.

0
0
0.000
avatar

Can't wait to use a defi that doesn't eat my profit by asking for ridiculous GAS fees...

0
0
0.000
avatar

Having myself in the past struggled with the posting of comments and the publication of articles, I'm most happy to read this news. Keep up the good work.

Posted Using LeoFinance Beta

0
0
0.000
avatar

Stay with this part of the post

Since LeoFinance exists on the second-layer of Hive (currently on Hive-Engine and soon migrating to our standalone second-layer), there is an additional delay on certain aspects of the site.

Eagerly awaiting new platform improvements

Posted Using LeoFinance Beta

0
0
0.000
avatar

Great update for usability, I always appreciated how @peakd has implemented the action queue and solved the latency issue that way :)

0
0
0.000
avatar

Super exciting!!!
As a fellow dev I understand how things take longer than expected, but this is a necessary step.

Thank you for your hardwork.

Posted Using LeoFinance Beta

0
0
0.000
avatar

"Fast is an attitude"

The longer its being delayed and worked upon to have that perfect experience for the whole lions and cubs,will surely be worth it.

!WINE

Posted Using LeoFinance Beta

0
0
0.000
avatar

Speed, give me all I need!!! And the Lightning DB surely delivers and is the foundation for the great expansion. If you want to make it big there are some steps that are a must and the speed of apps is the one factor that will keep the users on it and using it. Good pillar for what is to come!

Posted Using LeoFinance Beta

0
0
0.000
avatar

This is really awesome! Even more for people that have a really low speed internet service so no matter the fact of the speed of the frontend itself, the internet could delay it a little bit more, so this change is really awesome for a lot of people.

I really want to know a little bit more about the dev details because I'm a web developer haha so I would definitively want to know how did you improve the speed like that!

Good vibes and blessings from Caracas, Venezuela! We're ready to keep building something huge!

Posted Using LeoFinance Beta

0
0
0.000
avatar

Great news! I have been in Leo for just over 2 months and had no idea of any of the inner workings of Leo.finance, but this post has showed me there is a great deal of work going on in the background, something which I love to watch and keeps me happy to keep learning and understanding this platform. Anyways, just wanted to thank you for explaining current developments and future plans!

Posted Using LeoFinance Beta

0
0
0.000
avatar

Loading times are a pain in the a$$, so making things even more user friendly with changes like this are amazing. Great job!

Posted Using LeoFinance Beta

0
0
0.000
avatar

That's what I like about Leo. Constantly innovating. I don't know why something like this wasn't made for Hive (formerly Steem) years ago. It seems so obvious in hindsight that this is a much needed feature much like the easy onboarding.

30 minutes after publishing this post, the Lightning DB experienced another scalability issue. We've rolled it back and will fix the issue and redeploy as soon as possible. We'll edit this post with an update when it's live again.

Damn it. The anticipation builds...

Posted Using LeoFinance Beta

0
0
0.000
avatar

The difference in load times is massive.

No more stupid wait times and questions like "so did it work?" when I'm showing normies.

Great work team!

Posted Using LeoFinance Beta

0
0
0.000
avatar

Time is a very precious commodity, and Lightning DB Layer is the proof of how important the work and development of Leofinance is.
Really congratulations for the great work of continuous improvement!
!BEER

Posted Using LeoFinance Beta

0
0
0.000
avatar

Today's morning, when I have read this post, I just use it now. It is okay.
Thank you so much for your trying.
May LEO And HIVE Up to the Moon as Skyrocket!!!

Posted Using LeoFinance Beta

0
0
0.000
avatar

Great change and i really love it. I kind of sslty when things run slower than me. So it is really helpful for user experience especially those who are just nre here from centralized platforms. Keep it up.

Posted using Dapplr

0
0
0.000
avatar

How great they are. I had the opportunity to be present during the tests and the truth is that the speeds mainly in the publication of a comment is super fast, this is a great step for all the things that are to come.

Posted Using LeoFinance Beta

0
0
0.000
avatar

I have a question and a suggestion.

Being compatible with Leo Finance an ETH wallet means that if you can exchange an ETH in leodex, right? and it would be great if they could include BCH, RUNE, LINK, among others that are also very popular.

Posted Using LeoFinance Beta

0
0
0.000
avatar

User actions - commenting/publishing posts - the speed improvement is 10x... Yes, 10x.

this should make things faster and the overall experience will be even better. Good work @khaleelkazi

Posted Using LeoFinance Beta

0
0
0.000
avatar

Yup great work, LEO is now significantly faster!

Thinking about microblogging kind of makes me wonder if we don't need some sort of box to tick on sign up so people are ABSOLUTELY clear that they CANNOT delete anything they put on the chain.

Given that you're more likely to be flippant in short form.

Posted Using LeoFinance Beta

0
0
0.000
avatar
(Edited)

Hope lightning will be here before I say shoemaker (old czech byword).

And now I have one dream - multichain LEO token not just wLEO on ethereum blockchain - in binance chain, tron chain or other chain with no or really small fees...

Posted Using LeoFinance Beta

0
0
0.000
avatar

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

You distributed more than 14000 upvotes. Your next target is to reach 15000 upvotes.

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:

Next Hive Power Up Day is February 1st 2021
0
0
0.000
avatar

We're sure things would get much more interesting in the LeoFinance community and this would continue to pose a call for change on the entire Hive chain. Great move.

Posted Using LeoFinance Beta

0
0
0.000
avatar

In the current platform, when I write on the text box, the text box is covered with tagging so the text will not be seen fully, It is difficult to edit the text because there are disruption from the tagging that appear on the text box

Posted Using LeoFinance Beta

0
0
0.000