Using Hive to build a Metrics Dashboard

We are thinking of using the new Hive blocks as we are in the process of building a new dashboard with key metrics in UI buider.

Metrics categories include operations data from other systems but also data on the health of our Backendless app (eg. number of missing relations between 2 tables).

The current architecture we have started with is to:
a) Build timers that gradually update our desired metrics in a Backendless data table
b) When a user loads the dashboard UI, it simply pulls the data from the data table.

This avoids an impossibly long waiting time in case we pulled data from different sources at the time we load the page.

My question
How does Hive improve this situation?

  • Should we simply replace the backend DB with Hive allowing for faster retrieval? Or is Hive to be used more as temporary storage, as Mark uses it in the Hive demo app video?

  • Are there any benefits to using Hive other than fast retrieval on page load? For example, is it a good database option for larger amounts of data? We are currently only using one data point per metric in our dashboard (timer writes over previous data). But we may want to keep data as a series/graph, this may create a large amount of data rather fast.



Keep in mind that Hive is not a DB. It is more like a cache but with an extended capabilities of data management.
So if the amount of data isn’t huge (relatively to the db table) and the structure is simple (just a key-value) – use Hive. Оf course, you can serialize complex data to put it in the “value” (we do it for you by default, but you may implement your custom serialization too). As you see, the complex data is an unreadable piece, you cannot look into it unless you retrieve it – as a result Hive doesn’t support queries.
You have to decide what is more necessary in your workflow: the flexibility of queries or fast get/put operations.

There is cases when you can combine DB and Hive. E.g. SortedSet may contain always sorted elements of some data set, but the value is a just a link to some other resource (file, db, etc.). Maybe it is your case?


THank you, from what I hear, if it is more like Cache, I think our use case is not a good fit. We better use the DB like we are doing.

I am not sure, what is a good use case for Hive. Is it maybe a better option from using Page Data and App Data in our front ends? I am not sure what I should use it for…

Hello @Andreas_Marinopoulos!

I don’t think you should use Hive instead of AppData or PageData.
Here are some cases where Hive could be a great solution (job queues, leaderboards, game management, real-time analytics): Hive
Redis is used to implement Hive functions, you can read more about it here:
Redis: What It Is, What It Does, and Why You Should Care