# Overview

HollowDB can be used in many ways, with or without a backend and with different types of wallets. Although the interface of HollowDB is very simple, there are several things to consider when you are building an application with HollowDB:

* Side-effects of **lazy evaluation** that is used in [SmartWeave](https://github.com/ArweaveTeam/SmartWeave).
* Value size & usage of [Bundlr](https://docs.bundlr.network/).
* [Modes of operation](/hollowdb/modes-of-operation.md), i.e. **proofs** & **whitelisting**.

## Lazy Evaluation

> SmartWeave uses lazy-evaluation to move the burden of contract execution from network nodes to smart contract users. Currently, SmartWeave supports JavaScript, using the client's unmodified execution engine.

What this means is that, when a new client wants to make a transaction on a contract, they must download all preceding transactions and evaluate them locally. By doing that, they effectively reach the present state of the contract, upon which they execute their transaction.

The immediate side-effect of this is that if a contract has many interactions, it will take a longer time to lazy-evaluate it. Since HollowDB is a key-value database operated by a SmartWeave smart contract, the more keys & interaction a contract has, the longer it will take for clients to lazy-evaluate it.

Depending on your key-count and the data-size, you might prefer different architectures for your application. Let’s take a look at these scenarios:

<table data-header-hidden><thead><tr><th width="148.33333333333331"></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><strong>Small value</strong><br><strong>per key (&#x3C; 2KB)</strong></td><td><strong>Large value</strong><br><strong>per key (>= 2KB)</strong></td></tr><tr><td><strong>Few keys</strong><br><strong>per user</strong></td><td>Client-side only is probably enough, unless this is a very active app with many users.</td><td>You might use client-side only, but it would require the users to have a funded Bundlr account.</td></tr><tr><td><strong>Many keys</strong><br><strong>per user</strong></td><td>Client-side only may be enough, but consider a backend if there are many users. Or, use several contracts to group users.</td><td>You should use a backend with your own wallet to make the requests &#x26; upload to Bundlr when needed.</td></tr></tbody></table>

## Examples

There are various examples to demonstrate the basic operations of the HollowDB. Check out `example.js` and `exampleBundlr.js` and configure the variables. Then, put your an Arweave wallet (JWK) inside `examples/config/wallet.js`.&#x20;

To run the examples:

```sh
# go to examples folder
cd examples
# install dependencies
yarn
# run the example
node example
```

We also have a simple NextJS application to demonstrate wallet-connections and usage of HollowDB within the browser.

{% embed url="<https://github.com/firstbatchxyz/hollowdb-nextjs-simple>" %}
Simple NextJS App - GitHub
{% endembed %}

For bigger examples with frontend, check out:

{% content-ref url="/pages/OuLSBXBlNWWggCmNaBLW" %}
[Calendar](/use-cases/calendar.md)
{% endcontent-ref %}

{% content-ref url="/pages/PvMCODtyzqWISjBegkKN" %}
[Persona](/use-cases/persona.md)
{% endcontent-ref %}

{% content-ref url="/pages/hZMMI2XLN0VgTay8w2NK" %}
[Anonymous Authentication](/use-cases/anonymous-authentication.md)
{% endcontent-ref %}

If you haven't seen already, check the Quick Start section to see the most basic example usage of HollowDB:

{% content-ref url="/pages/P2oxnbGC17c02DoLCTzm" %}
[Quick Start](/quick-start.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hollowdb.xyz/use-cases/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
