TLDR:
Version 0.2 solves the problem of having to query all invoices on every login using a smart caching mechanism
The cache has a user-defined donation limit that always holds the latest donation data by only querying new invoices on login and automatically getting rid of old ones to keep the performance up
New user interface components display the loading progress & the current range of loaded donations in case the limit is reached
Up next: Dashboard usage via value split that a) enables podcasters without an Alby wallet to use the dashboard and b) allows us to preprocess donation data to overcome wallet API & browser performance limitations
Focal point of this release
The work for version 0.2 of our Value4Value Dashboard was focussed on a central question:
“How can we scale our dashboard to a point where podcasters with hundreds of thousands of transactions can use it comfortably without sacrificing privacy?”
In the process of solving this problem, we had to deal with two fundamental bottlenecks:
Wallet & Node APIs (in our case Alby) only allow you to query so many invoices in a certain amount of time.
Since we don’t want to store your donation data on our servers, we are limited to the storage & RAM resources that your browser allows us to allocate.
These bottlenecks meant that we could neither query all invoices fast enough on every login nor cache all donation data in your browser.
Introducing Smart Cache
We overcame these obstacles by implementing a caching mechanism that works with a user-defined maximum of donations that are held. On every login, new invoices are queried and cached so they are available immediately on the next login.
If the cached donations reach the limit, new invoices that are added replace the oldest donations to always keep the dashboard data up to date.
Advantages of this mechanism:
Your invoice history only has to be queried once
If you reload while querying new invoices, the majority of the data is saved and doesn’t have to be queried again
Reading from cache is significantly faster than loading invoices from your wallet: For example, querying 100k invoices from Alby takes around 6 minutes, reading 100k invoices from cache takes less than 10 seconds (values can vary based on internet connection & used device)
The donation data in your dashboard is always kept up to date with minimal loading time
Improvements to the user interface
In addition to a polished login page and a couple of smaller improvements, we have added two components that give the users key information about the status of loading & caching:
Limit indicator (header area): Only visible if cache limit is reached; shows the date until invoices are loaded:
Loading progress (footer area): Visible during loading / caching; shows the number of loaded donations and the date of the oldest loaded donation:
What’s next?
While our caching mechanism pushes the boundaries of what’s possible within the limitations of browser & wallet API performance, we are looking to take another step up.
Our next major update will enable you to use the dashboard by including Conshax in the value splits of your podcast.
This approach has two major advantages:
It makes the dashboard available to all Value4Value podcasters, no matter which wallet they use or if they run their own Lightning node.
We can preprocess your received donations, improve the dashboard performance beyond limits of browsers & external APIs, and create new, computation-intensive Value4Value insights for you.
Stay tuned!